diff options
author | Lee Salzman <[email protected]> | 2015-05-11 05:41:27 -0400 |
---|---|---|
committer | Lee Salzman <[email protected]> | 2015-05-11 05:41:27 -0400 |
commit | 5f476546edabdf37509cd3448d1a616f5eca535d (patch) | |
tree | 69d97ac51725628c893d4fb246b568f26b9c5c03 /CMakeLists.txt | |
parent | f7c46f03fd8d883ac2811948aa71c7623069d070 (diff) | |
download | enet-5f476546edabdf37509cd3448d1a616f5eca535d.tar.gz enet-5f476546edabdf37509cd3448d1a616f5eca535d.zip |
use getaddrinfo and getnameinfo where available
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ce6dc8f..1fe2f1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,8 @@ include(CheckStructHasMember) include(CheckTypeSize) check_function_exists("fcntl" HAS_FCNTL) check_function_exists("poll" HAS_POLL) +check_function_exists("getaddrinfo" HAS_GETADDRINFO) +check_function_exists("getnameinfo" HAS_GETNAMEINFO) check_function_exists("gethostbyname_r" HAS_GETHOSTBYNAME_R) check_function_exists("gethostbyaddr_r" HAS_GETHOSTBYADDR_R) check_function_exists("inet_pton" HAS_INET_PTON) @@ -23,6 +25,12 @@ endif() if(HAS_POLL) add_definitions(-DHAS_POLL=1) endif() +if(HAS_GETNAMEINFO) + add_definitions(-DHAS_GETNAMEINFO=1) +endif() +if(HAS_GETADDRINFO) + add_definitions(-DHAS_GETADDRINFO=1) +endif() if(HAS_GETHOSTBYNAME_R) add_definitions(-DHAS_GETHOSTBYNAME_R=1) endif() |