[llvm-bugs] [Bug 47208] When _XOPEN_SOURCE is set, <cstdlib> and <ctime> started to fail on macOS, missing ::aligned_alloc and ::timespec_get

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 1 12:14:31 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47208

Louis Dionne <ldionne at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED
 Fixed By Commit(s)|                            |99f3b231cb21abc567c93813650
                   |                            |cd76cfa614325

--- Comment #3 from Louis Dionne <ldionne at apple.com> ---
I just committed a fix:

commit 99f3b231cb21abc567c93813650cd76cfa614325
Author: Louis Dionne <ldionne at apple.com>
Date:   Tue Sep 1 15:05:33 2020 -0400

    [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


Can you please let me know if it fixes your issue? It does fix the reproducer I
created locally (and checked into the test suite).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200901/86871798/attachment.html>


More information about the llvm-bugs mailing list