apple: set -D_DARWIN_C_SOURCE globally
@@ -90,6 +90,17 @@ if (CMAKE_COMPILER_IS_GNUCXX)
endif (WIN32)
endif (CMAKE_COMPILER_IS_GNUCXX)
+#
+# Platform specific settings
+#
+if (APPLE)
+
+ # Workaround to not loose functions as soon as feature test macros are used
+ # https://boringssl.googlesource.com/boringssl/+/63a0797ff247f13870b649c3f6239d80be202752
+ # https://charm.cs.illinois.edu/redmine/issues/1743
+ add_definitions (-D_DARWIN_C_SOURCE)
+endif(APPLE)
+
if (WIN32)
set (HAVE_WIN32 "1")
message (STATUS "Win32 detected")
