From e312fbb37d6f47027482239c5c0d27f0673ea4f7 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sun, 8 Jan 2023 19:12:11 +0100
Subject: [PATCH] cmake: do all compile tests with -D_GNU_SOURCE=1
---
CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7063ef9c8545..bf672cabfa2b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -336,6 +336,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