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

View File

@@ -3023,7 +3023,7 @@ LIBS="$OLIBS"
# If it was added to LIBOBJS we need to export the symbols.
#
OLIBS="$LIBS"
LIBS="${LIBS} ${NET_LIBS}"
GETADDRINFO_LIBS=
AX_FUNC_GETADDRINFO
case " $LIBOBJS " in
*" getaddrinfo.$ac_objext "* )
@@ -3053,11 +3053,25 @@ case " $LIBOBJS " in
;;
*)
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"