From b51ccf8fcdf89afed1eead4baa67a192de48a5f7 Mon Sep 17 00:00:00 2001 From: Martin Man Date: Fri, 8 Mar 2024 15:51:59 +0100 Subject: [PATCH] use proper platform defines for IPv6 support --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5dd891d..81ed23c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,13 @@ if(HAS_SOCKLEN_T) add_definitions(-DHAS_SOCKLEN_T=1) endif() -add_definitions(-D_GNU_SOURCE=1) +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + add_definitions(-D_GNU_SOURCE=1) +endif() + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + add_definitions(-D__APPLE_USE_RFC_3542=1) +endif() include_directories(${PROJECT_SOURCE_DIR}/include)