From 881ff5df92a1c12a3afaeea3f422cb36f6e84b59 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 4 Feb 2015 12:18:37 -0800 Subject: 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 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- acinclude.m4 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index de635e1520..dba599c2ce 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -268,25 +268,27 @@ yes ]) # -# AC_WIRESHARK_GETHOSTBY_LIB_CHECK +# AC_WIRESHARK_GETADDRINFO_LIB_CHECK # -# 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 on 2000-01-14. # -AC_DEFUN([AC_WIRESHARK_GETHOSTBY_LIB_CHECK], +AC_DEFUN([AC_WIRESHARK_GETADDRINFO_LIB_CHECK], [ + # 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")) AC_SUBST(NSL_LIBS) ]) @@ -294,7 +296,7 @@ AC_DEFUN([AC_WIRESHARK_GETHOSTBY_LIB_CHECK], # AC_WIRESHARK_SOCKET_LIB_CHECK # # 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). # -- cgit v1.2.3