path: root/acinclude.m4
diff options
authorGerald Combs <gerald@wireshark.org>2015-02-04 12:18:37 -0800
committerAnders Broman <a.broman58@gmail.com>2015-02-06 08:07:10 +0000
commit881ff5df92a1c12a3afaeea3f422cb36f6e84b59 (patch)
tree9349e94359edc5f9c7d65112671b05af60898ae5 /acinclude.m4
parentd6ebb82ed24bb556d18d70bd2eb77947c07b94ff (diff)
Remove gethostbyaddr and gethostbyaddr2.
They've been deprecated for a very long time. Replace them with getaddrinfo. Note that we might not want to do synchronous name resolution at all. Add HAVE_GETADDRINFO to the KfW win-mac.h collision list. Change-Id: If59ce8a038776eadd6cd1794ed0e2dad8bf8a22c Reviewed-on: https://code.wireshark.org/review/6958 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'acinclude.m4')
1 files changed, 9 insertions, 7 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index de635e1520..dba599c2ce 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -268,25 +268,27 @@ yes
-# Checks whether we need "-lnsl" to get "gethostby*()", which we use
-# in "resolv.c".
+# Checks whether we need "-lnsl" to get "getaddrinfo()", which we use
+# in "addr_resolv.c".
# Adapted from stuff in the AC_PATH_XTRA macro in "acspecific.m4" in
# GNU Autoconf 2.13; the comment came from there.
# Done by Guy Harris <guy@alum.mit.edu> on 2000-01-14.
+ # Comments below apply to gethostbyname(), from which this was
+ # migrated:
# msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
# to get the SysV transport functions.
# chad@anasazi.com says the Pyramid MIS-ES running DC/OSx (SVR4)
# needs -lnsl.
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net.
- AC_CHECK_FUNC(gethostbyname, ,
- AC_CHECK_LIB(nsl, gethostbyname, NSL_LIBS="-lnsl"))
+ AC_CHECK_FUNC(getaddrinfo, ,
+ AC_CHECK_LIB(nsl, getaddrinfo, NSL_LIBS="-lnsl"))
# Checks whether we need "-lsocket" to get "socket()", which is used
-# by libpcap on some platforms - and, in effect, "gethostby*()" on
+# by libpcap on some platforms - and, in effect, "getaddrinfo()" on
# most if not all platforms (so that it can use NIS or DNS or...
# to look up host names).