diff options
author | Julien Schueller <schueller@phimeca.com> | 2020-07-17 06:58:01 (GMT) |
---|---|---|
committer | Julien Schueller <schueller@phimeca.com> | 2020-07-20 06:21:40 (GMT) |
commit | eea0337c7d6bddea9e10c2128beb4cea046c3b79 (patch) | |
tree | 2e679b6f31cbdd83a4a630b4fcc974b40e764976 /Source/cmStandardLexer.h | |
parent | d421274e3e11a0e6480358faa8a8e5cf48d7b3c2 (diff) | |
download | CMake-eea0337c7d6bddea9e10c2128beb4cea046c3b79.zip CMake-eea0337c7d6bddea9e10c2128beb4cea046c3b79.tar.gz CMake-eea0337c7d6bddea9e10c2128beb4cea046c3b79.tar.bz2 |
centos5: Fix FTBFS with strdup
Since commit f034b0f663 (CMake compilation: do not use compiler
extensions, 2020-03-14, v3.18.0-rc1~494^2) we need to explicitly enable
availability of `strdup`.
Fixes: #20971
Diffstat (limited to 'Source/cmStandardLexer.h')
-rw-r--r-- | Source/cmStandardLexer.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h index cc67ac2..e0b2116 100644 --- a/Source/cmStandardLexer.h +++ b/Source/cmStandardLexer.h @@ -3,6 +3,10 @@ #ifndef cmStandardLexer_h #define cmStandardLexer_h +#if defined(__linux) +/* Needed for glibc < 2.12 */ +# define _XOPEN_SOURCE 600 +#endif #if !defined(_WIN32) && !defined(__sun) /* POSIX APIs are needed */ # define _POSIX_C_SOURCE 200809L |