Solaris 2.6 has the prototypes for inet_pton() and inet_ntop() in
resolv.h.
This commit is contained in:
@@ -975,6 +975,10 @@
|
||||
*/
|
||||
#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
|
||||
|
||||
|
7
configure
vendored
7
configure
vendored
@@ -20349,6 +20349,12 @@ $as_echo "yes" >&6; }
|
||||
|
||||
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
|
||||
@@ -26790,5 +26796,6 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -2790,6 +2790,11 @@ AC_CHECK_FUNC([inet_pton], [
|
||||
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
|
||||
@@ -4336,6 +4341,7 @@ AH_TEMPLATE(HAVE__NSS_INITF_GROUP, [Define to 1 if you have the `_nss_initf_grou
|
||||
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
|
||||
|
@@ -51,6 +51,10 @@
|
||||
|
||||
#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"
|
||||
|
@@ -29,6 +29,10 @@
|
||||
#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>
|
||||
|
||||
|
@@ -36,6 +36,10 @@
|
||||
#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"
|
||||
|
@@ -67,6 +67,10 @@ struct rtentry;
|
||||
#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>
|
||||
|
Reference in New Issue
Block a user