[libc++] Workaround timespec_get not always being available in Apple SDKs
authorLouis Dionne <ldionne@apple.com>
Tue, 1 Sep 2020 19:05:33 +0000 (15:05 -0400)
committerLouis Dionne <ldionne@apple.com>
Tue, 1 Sep 2020 19:10:50 +0000 (15:10 -0400)
commit99f3b231cb21abc567c93813650cd76cfa614325
tree532049722ab6b1757d0e3805b42bbe6eacc110cc
parent10670bdf5451b85c5613cec0e8a78303f8914bfb
[libc++] Workaround timespec_get not always being available in Apple SDKs

timespec_get is not available in Apple SDKs when (__DARWIN_C_LEVEL >= __DARWIN_C_FULL)
isn't true, which leads to libc++ trying to import ::timespec_get into
namespace std when it's not available. This issue has been reported to
Apple's libc, but we need a workaround in the meantime.

https://llvm.org/PR47208
rdar://68157284
libcxx/include/__config
libcxx/test/libcxx/language.support/timespec_get.xopen.compile.pass.cpp [new file with mode: 0644]