1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-19 19:43:23 +08:00

macOS: Define _DARWIN_C_SOURCE in more sources

Restore Darwin APIs removed by `_POSIX_C_SOURCE`.
This commit is contained in:
Sergey Fedorov
2025-04-08 02:03:14 +08:00
committed by Brad King
parent 42e2964c5f
commit aa64d4482f
3 changed files with 19 additions and 0 deletions

View File

@@ -11,6 +11,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 "cmLoadCommandCommand.h"

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"