fi
LIBS="$OLIBS"
+if test X"$found" != X"true"; then
+ case " $LIBOBJS " in
+ *" inet_ntop.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
+ ;;
+esac
+
+
+ for _sym in sudo_inet_ntop; do
+ COMPAT_EXP="${COMPAT_EXP}${_sym}
+"
+ done
+
+fi
OLIBS="$LIBS"
LIBS="${LIBS} ${NET_LIBS}"
found=false
done
])
LIBS="$OLIBS"
+if test X"$found" != X"true"; then
+ AC_LIBOBJ(inet_ntop)
+ SUDO_APPEND_COMPAT_EXP(sudo_inet_ntop)
+fi
dnl
dnl If inet_pton(3) not in libc, check -lnsl and -linet
dnl May need to link with *both* -lnsl and -lsocket due to unresolved symbols
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
*/
-#ifndef _SUDO_MISSING_H
-#define _SUDO_MISSING_H
+#ifndef _SUDO_COMPAT_H
+#define _SUDO_COMPAT_H
#include <stdio.h>
#ifdef STDC_HEADERS
# undef clock_gettime
# define clock_gettime(_a, _b) sudo_clock_gettime((_a), (_b))
#endif /* HAVE_CLOCK_GETTIME */
+#if !defined(HAVE_INET_NTOP) && defined(_SUDO_NET_IFS_C)
+__dso_public char *sudo_inet_ntop(int af, const void *src, char *dst, socklen_t size);
+# undef inet_ntop
+# define inet_ntop(_a, _b, _c, _d) sudo_inet_ntop((_a), (_b), (_c), (_d))
+#endif /* HAVE_INET_NTOP */
#ifndef HAVE_INET_PTON
__dso_public int sudo_inet_pton(int af, const char *src, void *dst);
# undef inet_pton
# define getprogname() sudo_getprogname()
#endif /* HAVE_GETPROGNAME */
-#endif /* _SUDO_MISSING_H */
+#endif /* _SUDO_COMPAT_H */
* Paul Vixie, 1996.
*/
const char *
-inet_ntop(int af, const void *src, char *dst, socklen_t size)
+sudo_inet_ntop(int af, const void *src, char *dst, socklen_t size)
{
switch (af) {
case AF_INET:
# include <ifaddrs.h>
#endif
+#define _SUDO_NET_IFS_C /* to expose sudo_inet_ntop in sudo_compat.h */
+
#define DEFAULT_TEXT_DOMAIN "sudo"
#include "sudo_gettext.h" /* must be included before sudo_compat.h */