Add sudo_gai_fatal, sudo_gai_vfatal, sudo_gai_vwarn, sudo_gai_warn

and gai_log_warning that use gai_strerror() instead of strerror().
This commit is contained in:
Todd C. Miller
2018-11-05 09:08:05 -07:00
parent cfa4879dbd
commit cdd5bb32eb
11 changed files with 238 additions and 81 deletions

20
configure vendored
View File

@@ -21629,7 +21629,7 @@ LIBS="$OLIBS"
# If it was added to LIBOBJS we need to export the symbols.
#
OLIBS="$LIBS"
LIBS="${LIBS} ${NET_LIBS}"
GETADDRINFO_LIBS=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
$as_echo_n "checking for getaddrinfo... " >&6; }
if ${ax_cv_func_getaddrinfo+:} false; then :
@@ -21810,11 +21810,25 @@ fi
;;
*)
for lib in $LIBS; do
case "$NET_LIBS" in
case "$OLIBS" in
*"$lib"*) ;;
*) NET_LIBS="${NET_LIBS} $lib";;
*) GETADDRINFO_LIBS="${GETADDRINFO_LIBS}${GETADDRINFO_LIBS+ }$lib";;
esac
done
if test -n "${GETADDRINFO_LIBS}"; then
# We need libsudo_util to pull in dependent libraries for
# gai_strerror()
LT_DEP_LIBS="${LT_DEP_LIBS}${LT_DEP_LIBS+ }${GETADDRINFO_LIBS}"
LIBS="${LIBS}${LIBS+ }${GETADDRINFO_LIBS}"
# Add to NET_LIBS if necessary
for lib in $GETADDRINFO_LIBS; do
case "$NET_LIBS" in
*"$lib"*) ;;
*) NET_LIBS="${NET_LIBS}${NET_LIBS+ }$lib";;
esac
done
fi
;;
esac
LIBS="$OLIBS"