Changeset View
Changeset View
Standalone View
Standalone View
src/config/CMakeLists.txt
Show First 20 Lines • Show All 121 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) | ||||
check_symbol_exists(daemon "unistd.h" HAVE_DECL_DAEMON) | check_symbol_exists(daemon "unistd.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) | check_symbol_exists(getentropy "sys/random.h" HAVE_GETENTROPY_RAND) | ||||
# 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(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 */ | ||||
int main() { | int main() { | ||||
syscall(SYS_getrandom, nullptr, 0, 0); | syscall(SYS_getrandom, nullptr, 0, 0); | ||||
return 0; | return 0; | ||||
} | } | ||||
" HAVE_SYS_GETRANDOM) | " HAVE_SYS_GETRANDOM) | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |