resolv.h.
*/
#undef MAX_UID_T_LEN
+/* Define to 1 if resolv.h must be included to get the `inet_ntop' or
+ `inet_pton' function prototypes. */
+#undef NEED_RESOLV_H
+
/* Define to 1 if you don't want sudo to prompt for a password by default. */
#undef NO_AUTHENTICATION
NET_LIBS="${NET_LIBS} $libs"
INET_PTON_LIBS="$libs"
+ case "$libs" in
+ *-lresolv*)
+ $as_echo "#define NEED_RESOLV_H 1" >>confdefs.h
+
+ ;;
+ esac
break
else
+
AC_DEFINE(HAVE_INET_PTON)
NET_LIBS="${NET_LIBS} $libs"
INET_PTON_LIBS="$libs"
+ case "$libs" in
+ *-lresolv*)
+ AC_DEFINE(NEED_RESOLV_H)
+ ;;
+ esac
break
], [], [$extralibs])
done
AH_TEMPLATE(HAVE___NSS_INITF_GROUP, [Define to 1 if you have the `__nss_initf_group' function.])
AH_TEMPLATE(HAVE__NSS_XBYY_BUF_ALLOC, [Define to 1 if you have the `_nss_XbyY_buf_alloc' function.])
AH_TEMPLATE(HAVE___NSS_XBYY_BUF_ALLOC, [Define to 1 if you have the `__nss_XbyY_buf_alloc' function.])
+AH_TEMPLATE(NEED_RESOLV_H, [Define to 1 if resolv.h must be included to get the `inet_ntop' or `inet_pton' function prototypes.])
AH_TEMPLATE(HAVE_STRNLEN, [Define to 1 if you have the `strnlen' function.])
dnl
#include <arpa/inet.h>
#include <netinet/in.h>
+#ifdef NEED_RESOLV_H
+# include <arpa/nameser.h>
+# include <resolv.h>
+#endif /* NEED_RESOLV_H */
#include "sudo_compat.h"
#include "compat/getaddrinfo.h"
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#ifdef NEED_RESOLV_H
+# include <arpa/nameser.h>
+# include <resolv.h>
+#endif /* NEED_RESOLV_H */
#include <netdb.h>
#include <errno.h>
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#ifdef NEED_RESOLV_H
+# include <arpa/nameser.h>
+# include <resolv.h>
+#endif /* NEED_RESOLV_H */
#include "sudoers.h"
#include "interfaces.h"
#endif /* _MIPS */
#include <netinet/in.h>
#include <arpa/inet.h>
+#ifdef NEED_RESOLV_H
+# include <arpa/nameser.h>
+# include <resolv.h>
+#endif /* NEED_RESOLV_H */
#include <net/if.h>
#ifdef HAVE_GETIFADDRS
# include <ifaddrs.h>