diff options
author | Linux User <william@alpine-3-1.bad> | 2015-06-16 22:03:53 +0000 |
---|---|---|
committer | Linux User <william@alpine-3-1.bad> | 2015-06-16 22:03:53 +0000 |
commit | f04c43ef5ab676b8c6b7468b47a278aca47bd0f7 (patch) | |
tree | f792072fdac319104abce04bfd59af8e779bc8af /src | |
parent | 6fbdef8c580d553e6cd109e649272c98399145c2 (diff) | |
download | luaossl-f04c43ef5ab676b8c6b7468b47a278aca47bd0f7.tar.gz luaossl-f04c43ef5ab676b8c6b7468b47a278aca47bd0f7.tar.bz2 luaossl-f04c43ef5ab676b8c6b7468b47a278aca47bd0f7.zip |
quick fix to make it easier to build against musl libc
Diffstat (limited to 'src')
-rw-r--r-- | src/openssl.c | 10 |
1 files changed, 7 insertions, 3 deletions
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.h> /* assert */ #include <sys/types.h> /* ssize_t pid_t */ -#if !defined __sun && !defined _AIX -#include <sys/sysctl.h> /* CTL_KERN KERN_RANDOM RANDOM_UUID KERN_URND KERN_ARND sysctl(2) */ -#endif #include <sys/time.h> /* struct timeval gettimeofday(2) */ #include <sys/stat.h> /* struct stat stat(2) */ #include <sys/socket.h> /* 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 <sys/sysctl.h> /* 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 */ |