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:

committed by
Brad King

parent
42e2964c5f
commit
aa64d4482f
@@ -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"
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user