summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
authorDimitry Andric <dimitry@andric.com>2020-01-30 08:00:28 +0100
committerHans Wennborg <hans@chromium.org>2020-01-30 15:16:10 +0100
commit1a5959196da075e37ce55ea53b76a3db994197e6 (patch)
tree5f3cfa88ab64b5cbfa3fb4d7746c8c2f1677b501 /libcxx
parent1f95a775949e75b4cac48a0fb4e443e6725e9b64 (diff)
downloadbcm5719-llvm-1a5959196da075e37ce55ea53b76a3db994197e6.tar.gz
bcm5719-llvm-1a5959196da075e37ce55ea53b76a3db994197e6.zip
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 5e416ba943b7c737deb8eca62756f7b4fa925845)
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/include/__config4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 8f48f16c236..ccce227f4d6 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -342,6 +342,10 @@
# define _LIBCPP_HAS_ALIGNED_ALLOC
# define _LIBCPP_HAS_QUICK_EXIT
# define _LIBCPP_HAS_C11_FEATURES
+# if __FreeBSD_version >= 1300064 || \
+ (__FreeBSD_version >= 1201504 && __FreeBSD_version < 1300000)
+# define _LIBCPP_HAS_TIMESPEC_GET
+# endif
# elif defined(__BIONIC__)
# define _LIBCPP_HAS_C11_FEATURES
# if __ANDROID_API__ >= 21
OpenPOWER on IntegriCloud