]> git.armaanb.net Git - opendoas.git/blobdiff - configure
import sys-tree.h from openssh-portable
[opendoas.git] / configure
index 3e346951157a2146299a55f792fa434e52e910e0..c5981a58b295a2aecae4482f0fb31c93584176bd 100755 (executable)
--- a/configure
+++ b/configure
@@ -22,7 +22,6 @@ usage: configure [options]
   --target=target-alias  the machine that CC will produce code for
 
   --enable-debug         enable debugging
-  --enable-seccomp       enable seccomp
   --enable-static        prepare for static build
 
   --help, -h             display this help and exit
@@ -45,7 +44,6 @@ for x; do
        --host) HOST=$var;;
        --target) TARGET=$var;;
        --enable-debug) DEBUG=yes;;
-       --enable-seccomp) BUILD_SECCOMP=yes;;
        --enable-static) BUILD_STATIC=yes;;
        --help|-h) usage;;
        *) die "Error: unknown option $opt";;
@@ -266,6 +264,16 @@ int main(void) {
 check_func "bsd_auth_h" "$src" && \
        have_bsd_auth_h=1
 
+#
+# Check for sys/tree.h.
+#
+src='
+#include <sys/tree.h>
+int main(void) {
+       return 0;
+}'
+check_func "sys_tree_h" "$src"
+
 #
 # Check for pam_appl.h.
 #
@@ -316,27 +324,6 @@ int main(void) {
        pledge("", NULL);
        return 0;
 }'
-check_func "pledge" "$src" && {
-       have_pledge=1
-}
-
-#
-# Check for seccomp.h
-#
-src='
-#include <linux/seccomp.h>
-#include <sys/prctl.h>
-#include <unistd.h>
-int main(void) {
-       prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL);
-       return 0;
-}'
-[ -z "$have_pledge" -a -n "$BUILD_SECCOMP" ] && \
-       check_func "seccomp_h" "$src" && \
-       {
-               have_pledge=1
-               printf 'OPENBSD  +=     pledge-seccomp.o\n' >>$CONFIG_MK
-       }
-
-[ -z "$have_pledge" ] && \
+check_func "pledge" "$src" || {
        printf 'OPENBSD  +=     pledge-noop.o\n' >>$CONFIG_MK
+}