1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

Merge topic 'apple-posix'

f183631ae3 Merge branch 'backport-3.31-apple-posix' into apple-posix
aa64d4482f macOS: Define _DARWIN_C_SOURCE in more sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10619
This commit is contained in:
Brad King
2025-04-08 14:41:51 +00:00
committed by Kitware Robot
2 changed files with 13 additions and 0 deletions

View File

@@ -23,6 +23,12 @@
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _XOPEN_SOURCE 700
#endif
#if defined(__APPLE__)
// Restore Darwin APIs removed by _POSIX_C_SOURCE:
// aligned_alloc
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _DARWIN_C_SOURCE
#endif
#include "cmsys/Configure.h" // IWYU pragma: keep

View File

@@ -11,6 +11,13 @@
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _XOPEN_SOURCE 700
#endif
#if defined(__APPLE__)
// Restore Darwin APIs removed by _POSIX_C_SOURCE:
// aligned_alloc
// timespec_get
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _DARWIN_C_SOURCE
#endif
#include "cmTimestamp.h"