diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-03-26 17:05:02 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-03-26 17:05:02 +0000 |
commit | a9efb618f8301b756421e760d47d577a93408af3 (patch) | |
tree | bf73ae0426de33100d76fd834a8526c32166962a /contrib/libev | |
parent | cb88ca869dce2f5d6e6c2939a6c59d35f630c83d (diff) | |
download | rspamd-a9efb618f8301b756421e760d47d577a93408af3.tar.gz rspamd-a9efb618f8301b756421e760d47d577a93408af3.zip |
[Minor] Fix usage of signalfd and timerfd
Diffstat (limited to 'contrib/libev')
-rw-r--r-- | contrib/libev/CMakeLists.txt | 5 | ||||
-rw-r--r-- | contrib/libev/config.h.in | 3 | ||||
-rw-r--r-- | contrib/libev/ev.c | 2 |
3 files changed, 8 insertions, 2 deletions
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 <stdint.h> 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 |