Skip to content

Commit 1a59591

Browse files
DimitryAndriczmodem
authored andcommitted
Define _LIBCPP_HAS_TIMESPEC_GET for FreeBSD when appropriate
Summary: FreeBSD got `timespec_get` support somewhere in the 12.x timeframe, but the C++ version check in its system headers was written incorrectly. This has now been fixed for both FreeBSD 13 and 12. Add checks for the corresponding `__FreeBSD_version` values, to define `_LIBCPP_HAS_TIMESPEC_GET` when the function is supported. Reviewers: emaste, EricWF, ldionne, mclow.lists Reviewed By: ldionne Subscribers: arichardson, krytarowski, christof, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D71522 (cherry picked from commit 5e416ba)
1 parent 1f95a77 commit 1a59591

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libcxx/include/__config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@
342342
# define _LIBCPP_HAS_ALIGNED_ALLOC
343343
# define _LIBCPP_HAS_QUICK_EXIT
344344
# define _LIBCPP_HAS_C11_FEATURES
345+
# if __FreeBSD_version >= 1300064 || \
346+
(__FreeBSD_version >= 1201504 && __FreeBSD_version < 1300000)
347+
# define _LIBCPP_HAS_TIMESPEC_GET
348+
# endif
345349
# elif defined(__BIONIC__)
346350
# define _LIBCPP_HAS_C11_FEATURES
347351
# if __ANDROID_API__ >= 21

0 commit comments

Comments
 (0)