]> git.armaanb.net Git - opendoas.git/blobdiff - configure
opendoas: Fallback for setresuid(2).
[opendoas.git] / configure
index 4ae9b691414d9181b4e84ab9158c88abe9e763cc..679fe68b2419fa15640df3770fccd64c4976b322 100755 (executable)
--- a/configure
+++ b/configure
@@ -340,7 +340,9 @@ int main(void) {
        setresuid(0, 0, 0);
        return 0;
 }'
-check_func "setresuid" "$src" || die "system has no setresuid(2): not supported"
+check_func "setresuid" "$src" || {
+       printf 'OPENBSD  +=     bsd-setres_id.o\n' >>$CONFIG_MK
+}
 
 #
 # Check for closefrom().
@@ -451,6 +453,17 @@ int main(void) {
 }'
 check_func "ndir_h" "$src"
 
+#
+# Check for login_cap.h.
+#
+src='
+#include <sys/types.h>
+#include <login_cap.h>
+int main(void) {
+       return 0;
+}'
+check_func "login_cap_h" "$src"
+
 #
 #
 #