datastax/cpp-driver
src/CMakeLists.txt
:87
check_symbol_exists(timerfd_create "sys/timerfd.h" HAVE_TIMERFD)
check_symbol_exists(timerfd_create "sys/timerfd.h" HAVE_TIMERFD)
CHECK_FUNCTION_EXISTS(timerfd_create HAVE_TIMERFD)
ADD_DEFINITIONS(-DHAVE_TIMERFD)
ELSE (HAVE_TIMERFD)
ENDIF (HAVE_TIMERFD)
check_c_source_compiles("
#include <sys/timerfd.h>
int
main(int argc, char *argv[])
{
struct itimerspec its;
int fd;
if ((fd = timerfd_create(CLOCK_MONOTONIC, TFD_TIMER_ABSTIME)) != -1) {
its.it_interval.tv_sec = 0;
its.it_interval.tv_nsec = 0L;
its.it_value.tv_sec = 0;
its.it_value.tv_nsec = 0L;
return (timerfd_settime(fd, 0, &its, NULL) == -1);
}
return (1);
}
" HAVE_TIMERFD)
check_function_exists(timerfd_create HAVE_TIMERFD)