Commit 460b7b247f0046bda8b49242435924d03ea9f608

Anonymous Maarten 2023-01-08T19:12:11

cmake: do all compile tests with -D_GNU_SOURCE=1

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e539ffb..5c494c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -289,6 +289,8 @@ if(WINDOWS)
   set(CMAKE_SHARED_LIBRARY_PREFIX "")
 endif()
 
+set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -D_GNU_SOURCE=1")
+
 # Emscripten toolchain has a nonempty default value for this, and the checks
 # in this file need to change that, so remember the original value, and
 # restore back to that afterwards. For check_function_exists() to work in