[PATCH 02/22] Including <sys/prctl.h> iff it exists.
Alejandro Colomar
alx.manpages at gmail.com
Sun Jun 19 13:50:12 UTC 2022
---
auto/headers | 13 +++++++++++++
src/nxt_application.c | 2 +-
src/nxt_process.c | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/auto/headers b/auto/headers
index 8abf58eb..b7c30ebe 100644
--- a/auto/headers
+++ b/auto/headers
@@ -14,3 +14,16 @@ nxt_feature_test="#include <mntent.h>
return 0;
}"
. auto/feature
+
+
+nxt_feature="<sys/prctl.h>"
+nxt_feature_name=NXT_HAVE_SYS_PRCTL_H
+nxt_feature_run=no
+nxt_feature_incs=
+nxt_feature_libs=
+nxt_feature_test="#include <sys/prctl.h>
+
+ int main(void) {
+ return 0;
+ }"
+. auto/feature
diff --git a/src/nxt_application.c b/src/nxt_application.c
index 594574b1..3785d9e8 100644
--- a/src/nxt_application.c
+++ b/src/nxt_application.c
@@ -18,7 +18,7 @@
#include <glob.h>
-#if (NXT_HAVE_PR_SET_NO_NEW_PRIVS)
+#if (NXT_HAVE_SYS_PRCTL_H)
#include <sys/prctl.h>
#endif
diff --git a/src/nxt_process.c b/src/nxt_process.c
index 82e66a99..b7174850 100644
--- a/src/nxt_process.c
+++ b/src/nxt_process.c
@@ -12,7 +12,7 @@
#include <signal.h>
-#if (NXT_HAVE_PR_SET_NO_NEW_PRIVS)
+#if (NXT_HAVE_SYS_PRCTL_H)
#include <sys/prctl.h>
#endif
--
2.36.1
More information about the unit
mailing list