commit a9efb61: [Minor] Fix usage of signalfd and timerfd
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu Mar 26 17:07:06 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-03-26 17:05:02 +0000
URL: https://github.com/rspamd/rspamd/commit/a9efb618f8301b756421e760d47d577a93408af3 (HEAD -> master)
[Minor] Fix usage of signalfd and timerfd
---
contrib/libev/CMakeLists.txt | 5 ++++-
contrib/libev/config.h.in | 3 +++
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
More information about the Commits
mailing list