diff --git a/configure.in b/configure.in index 57910ed3a7..43839a3f8b 100644 --- a/configure.in +++ b/configure.in @@ -390,8 +390,9 @@ if test "$ac_cv_found_odbc" = "yes" ; then enable_core_odbc_support="yes" fi -AC_ARG_ENABLE(enable-timerfd-wrapper, - [AS_HELP_STRING([--enable-timerfd-wrapper], [timerfd is in the kernel but not in your libc])],,[enable_timer_fd_wrapper="no"]) + +AC_ARG_ENABLE(timerfd-wrapper, +[AC_HELP_STRING([--enable-timerfd-wrapper],[timerfd is in the kernel but not in your libc])],[enable_timer_fd_wrapper="$enableval"],[enable_timer_fd_wrapper="no"]) AM_CONDITIONAL([ENABLE_TIMERFD_WRAPPER],[test "x$enable_timer_fd_wrapper" != "xno"]) diff --git a/src/switch_time.c b/src/switch_time.c index 47fd09b8b9..bcee99c247 100644 --- a/src/switch_time.c +++ b/src/switch_time.c @@ -34,14 +34,17 @@ #include #include #include "private/switch_core_pvt.h" -#ifdef HAVE_TIMERFD_CREATE -#include -#endif #ifdef TIMERFD_WRAP #include +#ifndef HAVE_TIMERFD_CREATE #define HAVE_TIMERFD_CREATE #endif +#else +#ifdef HAVE_TIMERFD_CREATE +#include +#endif +#endif //#if defined(DARWIN) #define DISABLE_1MS_COND