From e89c4ec7f993c3713062731ddc193faa69f60f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Sat, 12 Dec 2015 07:09:29 +0000 Subject: cmake: Fix Unix introspection for floorl() [-Wredundant-decls] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I76a909c6f14b50b1a71205f9da2cb44a2e67969f Reviewed-on: https://code.wireshark.org/review/12561 Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte Reviewed-by: João Valverde Reviewed-by: Anders Broman --- ConfigureChecks.cmake | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ConfigureChecks.cmake') diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index b052888455..4e896b6e07 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -96,7 +96,14 @@ cmake_pop_check_state() # Use check_symbol_exists just in case math.h does something magic # and there's not actually a function named floorl() # +if(UNIX) + set(_mathlib m) +endif() +cmake_push_check_state() +set(CMAKE_REQUIRED_LIBRARIES ${_mathlib}) check_symbol_exists("floorl" "math.h" HAVE_FLOORL) +cmake_pop_check_state() + check_function_exists("getaddrinfo" HAVE_GETADDRINFO) check_function_exists("gethostbyname" HAVE_GETHOSTBYNAME) check_function_exists("gethostbyname2" HAVE_GETHOSTBYNAME2) -- cgit v1.2.1