From f04c43ef5ab676b8c6b7468b47a278aca47bd0f7 Mon Sep 17 00:00:00 2001 From: Linux User Date: Tue, 16 Jun 2015 22:03:53 +0000 Subject: quick fix to make it easier to build against musl libc --- src/openssl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/openssl.c b/src/openssl.c index 2390be0..7b2ce89 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -34,9 +34,6 @@ #include /* assert */ #include /* ssize_t pid_t */ -#if !defined __sun && !defined _AIX -#include /* CTL_KERN KERN_RANDOM RANDOM_UUID KERN_URND KERN_ARND sysctl(2) */ -#endif #include /* struct timeval gettimeofday(2) */ #include /* struct stat stat(2) */ #include /* AF_INET AF_INET6 */ @@ -6588,6 +6585,13 @@ static struct randL_state *randL_getstate(lua_State *L) { return lua_touserdata(L, lua_upvalueindex(1)); } /* randL_getstate() */ +#ifndef HAVE_SYS_SYSCTL_H +#define HAVE_SYS_SYSCTL_H (!defined __sun && !defined _AIX) +#endif + +#if HAVE_SYS_SYSCTL_H +#include /* CTL_KERN KERN_RANDOM RANDOM_UUID KERN_URND KERN_ARND sysctl(2) */ +#endif #ifndef HAVE_RANDOM_UUID #define HAVE_RANDOM_UUID (defined __linux) /* RANDOM_UUID is an enum, not macro */ -- cgit v1.2.3-59-g8ed1b