[PATCH 06/22] Including <sys/sendfile.h> iff it exists.
Alejandro Colomar
alx.manpages at gmail.com
Sun Jun 19 13:50:16 UTC 2022
---
auto/headers | 13 +++++++++++++
src/nxt_unix.h | 6 +-----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/auto/headers b/auto/headers
index 578c0a27..5d21ad06 100644
--- a/auto/headers
+++ b/auto/headers
@@ -53,3 +53,16 @@ nxt_feature_test="#include <sys/random.h>
return 0;
}"
. auto/feature
+
+
+nxt_feature="<sys/sendfile.h>"
+nxt_feature_name=NXT_HAVE_SYS_SENDFILE_H
+nxt_feature_run=no
+nxt_feature_incs=
+nxt_feature_libs=
+nxt_feature_test="#include <sys/sendfile.h>
+
+ int main(void) {
+ return 0;
+ }"
+. auto/feature
diff --git a/src/nxt_unix.h b/src/nxt_unix.h
index d1de8660..85a40416 100644
--- a/src/nxt_unix.h
+++ b/src/nxt_unix.h
@@ -222,11 +222,7 @@
#include <sys/pollset.h>
#endif
-#if (NXT_HAVE_LINUX_SENDFILE)
-#include <sys/sendfile.h>
-#endif
-
-#if (NXT_HAVE_SOLARIS_SENDFILEV)
+#if (NXT_HAVE_SYS_SENDFILE_H)
#include <sys/sendfile.h>
#endif
--
2.36.1
More information about the unit
mailing list