forked from osmocom/wireshark
cmake: Fix Unix introspection for floorl() [-Wredundant-decls]
Change-Id: I76a909c6f14b50b1a71205f9da2cb44a2e67969f Reviewed-on: https://code.wireshark.org/review/12561 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
48c818f3af
commit
e89c4ec7f9
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue