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
This commit is contained in:
Julien Schueller 2020-07-17 08:58:01 +02:00
parent d421274e3e
commit eea0337c7d

View File

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