[PATCH v2 03/25] Including <linux/openat2.h> iff it exists.

Alejandro Colomar alx.manpages at gmail.com
Mon Jun 20 07:10:46 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 b7c30ebe..34f5bb01 100644
--- a/auto/headers
+++ b/auto/headers
@@ -3,6 +3,19 @@
 # System headers.
 
 
+nxt_feature="<linux/openat2.h>"
+nxt_feature_name=NXT_HAVE_LINUX_OPENAT2_H
+nxt_feature_run=no
+nxt_feature_incs=
+nxt_feature_libs=
+nxt_feature_test="#include <linux/openat2.h>
+
+                  int main(void) {
+                      return 0;
+                  }"
+. auto/feature
+
+
 nxt_feature="<mntent.h>"
 nxt_feature_name=NXT_HAVE_MNTENT_H
 nxt_feature_run=no
diff --git a/src/nxt_unix.h b/src/nxt_unix.h
index d8eaabc3..16d27383 100644
--- a/src/nxt_unix.h
+++ b/src/nxt_unix.h
@@ -242,7 +242,7 @@
 #include <sys/mount.h>
 #endif
 
-#if (NXT_HAVE_OPENAT2)
+#if (NXT_HAVE_LINUX_OPENAT2_H)
 #include <linux/openat2.h>
 #endif
 
-- 
2.36.1



More information about the unit mailing list