Browse Source

macOS: Define _DARWIN_C_SOURCE in more sources

Restore Darwin APIs removed by `_POSIX_C_SOURCE`.
release
Sergey Fedorov 4 months ago
committed by Brad King
parent
commit
aa64d4482f
  1. 6
      Source/cmLoadCommandCommand.cxx
  2. 6
      Source/cmStandardLexer.h
  3. 7
      Source/cmTimestamp.cxx

6
Source/cmLoadCommandCommand.cxx

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

6
Source/cmStandardLexer.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

7
Source/cmTimestamp.cxx

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

Loading…
Cancel
Save