Skip to content

Commit

Permalink
[libc++] Sync TEST_HAS_TIMESPEC_GET and _LIBCPP_HAS_TIMESPEC_GET on F…
Browse files Browse the repository at this point in the history
…reeBSD

Commit 5e416ba (D71522) updated the
__config header but didn't change test_macros.h.
This fixes libcxx/language.support/has_timespec_get.compile.pass.cpp on
FreeBSD12/13.

Reviewed By: #libc, dim, ldionne

Differential Revision: https://reviews.llvm.org/D94292
  • Loading branch information
arichardson committed Jan 19, 2021
1 parent 3747b69 commit 077a84f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libcxx/test/support/test_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@
// This is cribbed from __config; but lives here as well because we can't assume libc++
#if __ISO_C_VISIBLE >= 2011 || TEST_STD_VER >= 11
# if defined(__FreeBSD__)
// Specifically, FreeBSD does NOT have timespec_get, even though they have all
// the rest of C11 - this is PR#38495
# if __FreeBSD_version >= 1300064 || \
(__FreeBSD_version >= 1201504 && __FreeBSD_version < 1300000)
# define TEST_HAS_TIMESPEC_GET
# endif
# define TEST_HAS_ALIGNED_ALLOC
# define TEST_HAS_QUICK_EXIT
# elif defined(__BIONIC__)
Expand Down

0 comments on commit 077a84f

Please sign in to comment.