]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
OpenBSD fixed their posix_spawn(3) implementation in 5.7
authorRoy Marples <roy@marples.name>
Mon, 5 Jan 2015 14:12:23 +0000 (14:12 +0000)
committerRoy Marples <roy@marples.name>
Mon, 5 Jan 2015 14:12:23 +0000 (14:12 +0000)
configure

index f61d3ba475f4425e8a50706506e48e621c74b562..bac56d7a2392982c64075f4e5c2584f5fb656811 100755 (executable)
--- a/configure
+++ b/configure
@@ -738,16 +738,21 @@ if [ -z "$POSIX_SPAWN" ]; then
        cat <<EOF >_posix_spawn.c
 #include <spawn.h>
 #include <stdlib.h>
+
+#ifdef __OpenBSD__
+#  include <sys/param.h>
+#  if OpenBSD<201505
+#    error posix_spawn was fixed in OpenBSD-5.7
+#  endif
+#endif
+
 int main(void) {
        posix_spawn(NULL, NULL, NULL, NULL, NULL, NULL);
        return 0;
 }
 EOF
        if $XCC _posix_spawn.c -o _posix_spawn 2>&3; then
-               case "$OS" in
-               openbsd*) printf "broken OpenBSD ... "; POSIX_SPAWN=no;;
-               *) POSIX_SPAWN=yes;;
-               esac
+               POSIX_SPAWN=yes
        else
                POSIX_SPAWN=no
        fi