summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2024-03-26 22:15:08 +0100
committerDarren Tucker <dtucker@dtucker.net>2024-07-03 11:22:50 +0200
commitee6b9e661633fcefd29dba0c811cecbc4d027f6f (patch)
tree20241339b4b2310e50ae3c7db6151f78613b85d0 /configure.ac
parentversion numbers (diff)
downloadopenssh-ee6b9e661633fcefd29dba0c811cecbc4d027f6f.tar.xz
openssh-ee6b9e661633fcefd29dba0c811cecbc4d027f6f.zip
Fix detection of setres*id on GNU/Hurd
Like Linux, proper _SOURCE macros need to be set to get declarations of various standard functions, notably setres*id. Now that Debian is using -Werror=implicit-function-declaration this is really required. While at it, define other _SOURCE macros like on GNU/Linux, since GNU/Hurd uses the same glibc.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5a865f8e1..2eede34c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1348,6 +1348,13 @@ EOD
AC_DEFINE([BROKEN_SETVBUF], [1],
[LynxOS has broken setvbuf() implementation])
;;
+*-*-gnu*)
+ dnl GNU Hurd. Needs to be after the linux and the other *-gnu entries.
+ dnl Target SUSv3/POSIX.1-2001 plus BSD specifics.
+ dnl _DEFAULT_SOURCE is the new name for _BSD_SOURCE
+ dnl _GNU_SOURCE is needed for setres*id prototypes.
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE"
+ ;;
esac
AC_MSG_CHECKING([compiler and flags for sanity])