Define _BSD_SOURCE on FreeBSD, OpenBSD and DragonflyBSD

This commit is contained in:
Todd C. Miller
2011-09-21 09:46:52 -04:00
parent 32c1ae8f7e
commit 441abee4e8
2 changed files with 8 additions and 2 deletions

5
configure vendored
View File

@@ -14211,6 +14211,7 @@ done
SKIP_SETREUID=yes SKIP_SETREUID=yes
;; ;;
esac esac
OSDEFS="${OSDEFS} -D_BSD_SOURCE"
if test "${with_skey-'no'}" = "yes"; then if test "${with_skey-'no'}" = "yes"; then
SUDOERS_LIBS="${SUDOERS_LIBS} -lmd" SUDOERS_LIBS="${SUDOERS_LIBS} -lmd"
fi fi
@@ -14220,8 +14221,9 @@ done
;; ;;
*-*-*openbsd*) *-*-*openbsd*)
# OpenBSD has a real setreuid(2) starting with 3.3 but # OpenBSD has a real setreuid(2) starting with 3.3 but
# we will use setreuid(2) instead. # we will use setresuid(2) instead.
SKIP_SETREUID=yes SKIP_SETREUID=yes
OSDEFS="${OSDEFS} -D_BSD_SOURCE"
CHECKSHADOW="false" CHECKSHADOW="false"
# OpenBSD >= 3.0 supports BSD auth # OpenBSD >= 3.0 supports BSD auth
if test -z "$with_bsdauth"; then if test -z "$with_bsdauth"; then
@@ -14243,6 +14245,7 @@ done
: ${with_logincap='maybe'} : ${with_logincap='maybe'}
;; ;;
*-*-dragonfly*) *-*-dragonfly*)
OSDEFS="${OSDEFS} -D_BSD_SOURCE"
if test "${with_skey-'no'}" = "yes"; then if test "${with_skey-'no'}" = "yes"; then
SUDOERS_LIBS="${SUDOERS_LIBS} -lmd" SUDOERS_LIBS="${SUDOERS_LIBS} -lmd"
fi fi

View File

@@ -1785,6 +1785,7 @@ case "$host" in
SKIP_SETREUID=yes SKIP_SETREUID=yes
;; ;;
esac esac
OSDEFS="${OSDEFS} -D_BSD_SOURCE"
if test "${with_skey-'no'}" = "yes"; then if test "${with_skey-'no'}" = "yes"; then
SUDOERS_LIBS="${SUDOERS_LIBS} -lmd" SUDOERS_LIBS="${SUDOERS_LIBS} -lmd"
fi fi
@@ -1794,8 +1795,9 @@ case "$host" in
;; ;;
*-*-*openbsd*) *-*-*openbsd*)
# OpenBSD has a real setreuid(2) starting with 3.3 but # OpenBSD has a real setreuid(2) starting with 3.3 but
# we will use setreuid(2) instead. # we will use setresuid(2) instead.
SKIP_SETREUID=yes SKIP_SETREUID=yes
OSDEFS="${OSDEFS} -D_BSD_SOURCE"
CHECKSHADOW="false" CHECKSHADOW="false"
# OpenBSD >= 3.0 supports BSD auth # OpenBSD >= 3.0 supports BSD auth
if test -z "$with_bsdauth"; then if test -z "$with_bsdauth"; then
@@ -1817,6 +1819,7 @@ case "$host" in
: ${with_logincap='maybe'} : ${with_logincap='maybe'}
;; ;;
*-*-dragonfly*) *-*-dragonfly*)
OSDEFS="${OSDEFS} -D_BSD_SOURCE"
if test "${with_skey-'no'}" = "yes"; then if test "${with_skey-'no'}" = "yes"; then
SUDOERS_LIBS="${SUDOERS_LIBS} -lmd" SUDOERS_LIBS="${SUDOERS_LIBS} -lmd"
fi fi