[PATCH v2 11/25] Including <sys/eventfd.h> iff it exists.

Alejandro Colomar alx.manpages at gmail.com
Mon Jun 20 07:10:54 UTC 2022


---
 auto/headers   | 13 +++++++++++++
 src/nxt_unix.h |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/auto/headers b/auto/headers
index 4db0f046..d6918cec 100644
--- a/auto/headers
+++ b/auto/headers
@@ -55,6 +55,19 @@ nxt_feature_test="#include <sys/devpoll.h>
 . auto/feature
 
 
+nxt_feature="<sys/eventfd.h>"
+nxt_feature_name=NXT_HAVE_SYS_EVENTFD_H
+nxt_feature_run=no
+nxt_feature_incs=
+nxt_feature_libs=
+nxt_feature_test="#include <sys/eventfd.h>
+
+                  int main(void) {
+                      return 0;
+                  }"
+. auto/feature
+
+
 nxt_feature="<sys/event.h>"
 nxt_feature_name=NXT_HAVE_SYS_EVENT_H
 nxt_feature_run=no
diff --git a/src/nxt_unix.h b/src/nxt_unix.h
index 72234939..c5c4de72 100644
--- a/src/nxt_unix.h
+++ b/src/nxt_unix.h
@@ -202,7 +202,7 @@
 #include <sys/signalfd.h>
 #endif
 
-#if (NXT_HAVE_EVENTFD)
+#if (NXT_HAVE_SYS_EVENTFD_H)
 #include <sys/eventfd.h>
 #endif
 
-- 
2.36.1



More information about the unit mailing list