From 10286f45e7c0813f6122cd8fd957e96a9f921b16 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Thu, 6 Nov 2014 01:32:43 +0100 Subject: cmake: fix HAVE_GETHOSTNAME definition Otherwise Curl_gethostname always fails. Windows has gethostname since Vista according to http://msdn.microsoft.com/en-us/library/ms738527%28VS.85%29.aspx, but accordings to byte_bucket's VC 2005 documentation, it is available even in Windows 95. (possibly after installing a Platform SDK, the Windows Server 2003 SP1 Platform SDK should be sufficient). Signed-off-by: Peter Wu --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 45f46ec5e..a325d1c1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -252,6 +252,8 @@ if(NOT NOT_NEED_LIBNSL) check_library_exists_concat("nsl" gethostbyname HAVE_LIBNSL) endif(NOT NOT_NEED_LIBNSL) +check_function_exists(gethostname HAVE_GETHOSTNAME) + if(WIN32) check_library_exists_concat("ws2_32" getch HAVE_LIBWS2_32) check_library_exists_concat("winmm" getch HAVE_LIBWINMM) -- cgit v1.2.3