aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/rand
diff options
context:
space:
mode:
authorClang via Jeffrey Walton <noloader@gmail.com>2015-02-12 11:20:48 -0500
committerRich Salz <rsalz@openssl.org>2015-02-12 12:50:09 -0500
commit5006c32253483ba232dd441c28624801195cd7b5 (patch)
treeb252ca8f9f31f34c299f954fd014671a5d2e39b2 /crypto/rand
parent1d2932de4cefcc200f175863a42c311916269981 (diff)
downloadopenssl-5006c32253483ba232dd441c28624801195cd7b5.tar.gz
RT3684: rand_egd needs stddef.h
And remove backup definition of offsetof. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/rand')
-rw-r--r--crypto/rand/rand_egd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/crypto/rand/rand_egd.c b/crypto/rand/rand_egd.c
index 53d7a2bb37..44ed4bb47c 100644
--- a/crypto/rand/rand_egd.c
+++ b/crypto/rand/rand_egd.c
@@ -113,6 +113,7 @@ int RAND_egd_bytes(const char *path, int bytes)
#else
# include <openssl/opensslconf.h>
# include OPENSSL_UNISTD
+# include <stddef.h>
# include <sys/types.h>
# include <sys/socket.h>
# ifndef NO_SYS_UN_H
@@ -130,10 +131,6 @@ struct sockaddr_un {
# include <string.h>
# include <errno.h>
-# ifndef offsetof
-# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-# endif
-
int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
{
int ret = 0;