diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2015-02-28 22:20:07 -0500 |
---|---|---|
committer | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2015-03-03 15:02:08 +0000 |
commit | a308aef89d5b262c9e04f51e2a695bee90446cb1 (patch) | |
tree | 70d8a3eb1a1328ab08133fbbc90ca3de1e2feb6d /ConfigureChecks.cmake | |
parent | 90706569afaa4f7fdd9b4441cf2ab8466a2ac574 (diff) |
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 <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
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) |