Blame SOURCES/corefx-optflags-support.patch

627693
diff --git a/src/Native/Unix/configure.cmake b/src/Native/Unix/configure.cmake
627693
index f4a30ad6cb..f2db68402a 100644
627693
--- a/src/Native/Unix/configure.cmake
627693
+++ b/src/Native/Unix/configure.cmake
627693
@@ -27,6 +27,12 @@ else ()
627693
     message(FATAL_ERROR "Unknown platform.  Cannot define PAL_UNIX_NAME, used by RuntimeInformation.")
627693
 endif ()
627693
 
627693
+
627693
+set (PREVIOUS_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
627693
+set (CMAKE_CXX_FLAGS "-D_GNU_SOURCE")
627693
+set (PREVIOUS_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
627693
+set (CMAKE_C_FLAGS "-D_GNU_SOURCE")
627693
+
627693
 # We compile with -Werror, so we need to make sure these code fragments compile without warnings.
627693
 # Older CMake versions (3.8) do not assign the result of their tests, causing unused-value errors
627693
 # which are not distinguished from the test failing. So no error for that one.
627693
@@ -698,6 +704,9 @@ endif()
627693
 
627693
 set (CMAKE_REQUIRED_LIBRARIES)
627693
 
627693
+set (CMAKE_CXX_FLAGS "${PREVIOUS_CMAKE_CXX_FLAGS}")
627693
+set (CMAKE_C_FLAGS "${PREVIOUS_CMAKE_C_FLAGS}")
627693
+
627693
 check_c_source_compiles(
627693
     "
627693
     #include <sys/inotify.h>