From: Vsevolod Stakhov Date: Thu, 26 Mar 2020 17:05:02 +0000 (+0000) Subject: [Minor] Fix usage of signalfd and timerfd X-Git-Tag: 2.5~18 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a9efb618f8301b756421e760d47d577a93408af3;p=rspamd.git [Minor] Fix usage of signalfd and timerfd --- diff --git a/contrib/libev/CMakeLists.txt b/contrib/libev/CMakeLists.txt index e81aaee3f..53ab6c362 100644 --- a/contrib/libev/CMakeLists.txt +++ b/contrib/libev/CMakeLists.txt @@ -38,7 +38,10 @@ IF(HAVE_SYS_EVENTFD_H) CHECK_SYMBOL_EXISTS(eventfd sys/eventfd.h HAVE_EVENTFD) ENDIF() IF(HAVE_SYS_SIGNALFD_H) - CHECK_SYMBOL_EXISTS(signalfd sys/signalfd.h HAVE_EVENTFD) + CHECK_SYMBOL_EXISTS(signalfd sys/signalfd.h HAVE_SIGNALFD) +ENDIF() +IF(HAVE_SYS_TIMERFD_H) + CHECK_SYMBOL_EXISTS(timerfd_create sys/timerfd.h HAVE_TIMERFD) ENDIF() IF(HAVE_LINUX_FS_H) CHECK_SYMBOL_EXISTS(RWF_SUPPORTED linux/fs.h HAVE_KERNEL_RWF_T) diff --git a/contrib/libev/config.h.in b/contrib/libev/config.h.in index 10fc6271a..686a37988 100644 --- a/contrib/libev/config.h.in +++ b/contrib/libev/config.h.in @@ -63,6 +63,9 @@ /* Define to 1 if you have the `signalfd' function. */ #cmakedefine HAVE_SIGNALFD 1 +/* Define to 1 if you have the `timerfd_create' function. */ +#cmakedefine HAVE_TIMERFD 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STDINT_H 1 diff --git a/contrib/libev/ev.c b/contrib/libev/ev.c index 297fa7e1b..a9660cd22 100644 --- a/contrib/libev/ev.c +++ b/contrib/libev/ev.c @@ -184,7 +184,7 @@ # define EV_USE_EVENTFD 0 # endif -# if HAVE_SYS_TIMERFD_H +# if HAVE_SYS_TIMERFD_H && HAVE_TIMERFD # ifndef EV_USE_TIMERFD # define EV_USE_TIMERFD EV_FEATURE_OS # endif