Changeset View
Changeset View
Standalone View
Standalone View
src/config/CMakeLists.txt
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | |||||
# Various system libraries | # Various system libraries | ||||
check_symbol_exists(strnlen "string.h" HAVE_DECL_STRNLEN) | check_symbol_exists(strnlen "string.h" HAVE_DECL_STRNLEN) | ||||
# daemon() is located in unistd.h on linux and in stdlib.h on BSDs and macOS. | # daemon() is located in unistd.h on linux and in stdlib.h on BSDs and macOS. | ||||
check_symbol_exists(daemon "unistd.h;stdlib.h" HAVE_DECL_DAEMON) | check_symbol_exists(daemon "unistd.h;stdlib.h" HAVE_DECL_DAEMON) | ||||
# Check for ways to obtain entropy | # Check for ways to obtain entropy | ||||
check_symbol_exists(getentropy "unistd.h" HAVE_GETENTROPY) | check_symbol_exists(getentropy "unistd.h" HAVE_GETENTROPY) | ||||
check_symbol_exists(getentropy "sys/random.h" HAVE_GETENTROPY_RAND) | # macOS needs unistd.h and sys/random.h to define getentropy | ||||
check_symbol_exists(getentropy "unistd.h;sys/random.h" HAVE_GETENTROPY_RAND) | |||||
# getifaddrs and freeifaddrs may be unavailable with some Android versions | # getifaddrs and freeifaddrs may be unavailable with some Android versions | ||||
check_symbol_exists(getifaddrs "sys/types.h;ifaddrs.h" HAVE_DECL_GETIFADDRS) | check_symbol_exists(getifaddrs "sys/types.h;ifaddrs.h" HAVE_DECL_GETIFADDRS) | ||||
check_symbol_exists(freeifaddrs "sys/types.h;ifaddrs.h" HAVE_DECL_FREEIFADDRS) | check_symbol_exists(freeifaddrs "sys/types.h;ifaddrs.h" HAVE_DECL_FREEIFADDRS) | ||||
check_cxx_source_compiles(" | check_cxx_source_compiles(" | ||||
#include <unistd.h> /* for syscall */ | #include <unistd.h> /* for syscall */ | ||||
#include <sys/syscall.h> /* for SYS_getrandom */ | #include <sys/syscall.h> /* for SYS_getrandom */ | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |