From d6e315d25db5c2a10b552cddd3aec93ce9398f26 Mon Sep 17 00:00:00 2001 From: David Adam Date: Thu, 20 Dec 2018 21:36:01 +0800 Subject: [PATCH] cmake: define _GNU_SOURCE Fixes the build on Cygwin. Analogous to AC_USE_SYSTEM_EXTENSIONS under Autoconf. Closes #5423. --- config_cmake.h.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config_cmake.h.in b/config_cmake.h.in index 2c23ad452..d234acba9 100644 --- a/config_cmake.h.in +++ b/config_cmake.h.in @@ -142,6 +142,11 @@ /* Define to 1 if tparm accepts a fixed amount of paramters. */ #cmakedefine TPARM_SOLARIS_KLUDGE 1 +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + /* The size of wchar_t in bits. */ #define WCHAR_T_BITS ${WCHAR_T_BITS}