summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Viennot <nicolas@viennot.biz>2014-09-12 16:06:06 -0400
committerNicolas Viennot <nicolas@viennot.biz>2014-09-12 16:08:10 -0400
commit0783022d6d77ab3716e2a754856d40497b4cfd76 (patch)
tree96ff03b2c44b3600ef0ee541fc4b56710ef2b61d
parentdfe63e9e738bff7764f65ffe4449088f4a13feca (diff)
Fix issue with OSX 10.101.8.9a
-rw-r--r--libssh/ConfigureChecks.cmake13
1 files changed, 11 insertions, 2 deletions
diff --git a/libssh/ConfigureChecks.cmake b/libssh/ConfigureChecks.cmake
index 472fe79e..29b70636 100644
--- a/libssh/ConfigureChecks.cmake
+++ b/libssh/ConfigureChecks.cmake
@@ -101,8 +101,17 @@ check_function_exists(snprintf HAVE_SNPRINTF)
check_function_exists(poll HAVE_POLL)
check_function_exists(select HAVE_SELECT)
check_function_exists(getaddrinfo HAVE_GETADDRINFO)
-check_function_exists(ntohll HAVE_NTOHLL)
-check_function_exists(htonll HAVE_HTONLL)
+
+check_symbol_exists(ntohll sys/types.h HAVE_NTOHLL)
+check_symbol_exists(htonll sys/types.h HAVE_HTONLL)
+
+if (NOT HAVE_NTOHLL)
+ check_function_exists(ntohll HAVE_NTOHLL)
+endif (NOT HAVE_NTOHLL)
+if (NOT HAVE_HTONLL)
+ check_function_exists(ntohll HAVE_HTONLL)
+endif (NOT HAVE_HTONLL)
+
if (WIN32)
check_function_exists(_strtoui64 HAVE__STRTOUI64)