From a308aef89d5b262c9e04f51e2a695bee90446cb1 Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Sat, 28 Feb 2015 22:20:07 -0500 Subject: Look for and use gethostbyname() if we don't have getaddrinfo(). Fail to configure if we can't find any name resolver (autotools only). This puts back the gethostbyname()/gethostbyname2() code removed in I3348179626e97daaddfbc89e3ed21e39915e3de4 and If59ce8a038776eadd6cd1794ed0e2dad8bf8a22c but as a last-resort option (only if we don't have a better or more modern name resolver). As suggested/requested by Guy in https://code.wireshark.org/review/#/c/7423/ Change-Id: I706dbbd65135f47c67d3d8d88a61ad7273914c47 Reviewed-on: https://code.wireshark.org/review/7447 Petri-Dish: Jeff Morriss Tested-by: Petri Dish Buildbot Reviewed-by: Jeff Morriss --- ConfigureChecks.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ConfigureChecks.cmake') diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 50e312e04a..69ca619068 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -69,6 +69,8 @@ cmake_pop_check_state() # check_symbol_exists("floorl" "math.h" HAVE_FLOORL) check_function_exists("getaddrinfo" HAVE_GETADDRINFO) +check_function_exists("gethostbyname" HAVE_GETHOSTBYNAME) +check_function_exists("gethostbyname2" HAVE_GETHOSTBYNAME2) check_function_exists("getopt_long" HAVE_GETOPT_LONG) if(HAVE_GETOPT_LONG) if(HAVE_GETOPT_H) -- cgit v1.2.1