From c83b7d4096ece0ca536c3028e59efc29eb438feb Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 29 Jul 2014 08:19:34 +0200 Subject: Add #define __APPLE_USE_RFC_3542 to CFLAGS Unless __APPLE_USE_RFC_3542 is defined on OSX, constants from RFC 3542 such as IPV6_RECVPKTINFO are not usable. The patch adds the #define unconditionally -- on other platforms, the constant is harmless. Signed-off-by: Jakub Hrozek Reviewed-by: Andreas Schneider Reviewed-by: Michael Adam --- cmake/Modules/DefineCompilerFlags.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmake/Modules') diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake index 28f4796..4a747d2 100644 --- a/cmake/Modules/DefineCompilerFlags.cmake +++ b/cmake/Modules/DefineCompilerFlags.cmake @@ -21,6 +21,10 @@ if (UNIX AND NOT WIN32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE") + if (OSX) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__APPLE_USE_RFC_3542") + endif (OSX) + # with -fPIC check_c_compiler_flag("-fPIC" WITH_FPIC) if (WITH_FPIC) -- cgit