diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2017-06-10 13:22:48 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2017-06-13 08:56:13 -0400 |
commit | 6f88c28c44a0b2957ecf20eac7a2853c9b6ae0ae (patch) | |
tree | b59d95d0bbaca92af479773ae8ffc4b5b36627c8 /src | |
parent | 9fd39690be809460cafd5bd02ad2262a3695cbbf (diff) | |
download | lighttpd-git-6f88c28c44a0b2957ecf20eac7a2853c9b6ae0ae.tar.gz |
[core] fix compiler warnings on Mac OS X
(thx wardw)
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/fdevent.c | 2 | ||||
-rw-r--r-- | src/rand.c | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index de14e0e0..0cf0d0b1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -122,6 +122,11 @@ set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h) check_type_size(socklen_t HAVE_SOCKLEN_T) set(CMAKE_EXTRA_INCLUDE_FILES) +check_include_files(sys/random.h HAVE_SYS_RANDOM_H) +set(CMAKE_EXTRA_INCLUDE_FILES sys/random.h) +check_function_exists(getentropy HAVE_GETENTROPY) +set(CMAKE_EXTRA_INCLUDE_FILES) + check_include_files(linux/random.h HAVE_LINUX_RANDOM_H) set(CMAKE_EXTRA_INCLUDE_FILES linux/random.h) check_function_exists(getrandom HAVE_GETRANDOM) @@ -134,7 +139,6 @@ check_function_exists(arc4random_buf HAVE_ARC4RANDOM_BUF) check_function_exists(chroot HAVE_CHROOT) check_function_exists(epoll_ctl HAVE_EPOLL_CTL) check_function_exists(fork HAVE_FORK) -check_function_exists(getentropy HAVE_GETENTROPY) check_function_exists(getloadavg HAVE_GETLOADAVG) check_function_exists(getrlimit HAVE_GETRLIMIT) check_function_exists(getuid HAVE_GETUID) diff --git a/src/fdevent.c b/src/fdevent.c index 9e1ad458..626ae27d 100644 --- a/src/fdevent.c +++ b/src/fdevent.c @@ -13,7 +13,9 @@ #include <errno.h> #include <fcntl.h> +#ifdef SOCK_CLOEXEC static int use_sock_cloexec; +#endif fdevents *fdevent_init(server *srv, size_t maxfds, int type) { fdevents *ev; @@ -21,6 +21,9 @@ #include <openssl/opensslv.h> /* OPENSSL_VERSION_NUMBER */ #include <openssl/rand.h> #endif +#ifdef HAVE_GETENTROPY +#include <sys/random.h> +#endif #ifdef HAVE_LINUX_RANDOM_H #include <sys/syscall.h> #include <linux/random.h> |