Changeset View
Changeset View
Standalone View
Standalone View
src/config/CMakeLists.txt
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | |||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux") | if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux") | ||||
check_symbol_exists(sysctl "sys/types.h;sys/sysctl.h" HAVE_SYSCTL) | check_symbol_exists(sysctl "sys/types.h;sys/sysctl.h" HAVE_SYSCTL) | ||||
endif() | endif() | ||||
# 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_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC) | |||||
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 */ | ||||
#include <linux/random.h> | #include <linux/random.h> | ||||
int main() { | int main() { | ||||
syscall(SYS_getrandom, nullptr, 0, 0); | syscall(SYS_getrandom, nullptr, 0, 0); | ||||
return 0; | return 0; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |