cmake: define _GNU_SOURCE

Fixes the build on Cygwin. Analogous to AC_USE_SYSTEM_EXTENSIONS under Autoconf.

Closes #5423.
This commit is contained in:
David Adam 2018-12-20 21:36:01 +08:00
parent 14ee19cc1b
commit d6e315d25d

View File

@ -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}