summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jakub.hrozek@gmail.com>2014-07-29 08:19:34 +0200
committerAndreas Schneider <asn@samba.org>2014-08-15 10:54:07 +0200
commitc83b7d4096ece0ca536c3028e59efc29eb438feb (patch)
tree3c11686510ed3a3997b5aba67487b0717b633d53
parentbc546d05a93794b1f0f1ef02e96f918533c250c3 (diff)
downloadsocket_wrapper-c83b7d4096ece0ca536c3028e59efc29eb438feb.tar.gz
socket_wrapper-c83b7d4096ece0ca536c3028e59efc29eb438feb.tar.xz
socket_wrapper-c83b7d4096ece0ca536c3028e59efc29eb438feb.zip
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 <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--cmake/Modules/DefineCompilerFlags.cmake4
1 files changed, 4 insertions, 0 deletions
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)