Author: Dimitry Andric Date: 2020-01-30T15:16:10+01:00 New Revision: 1a5959196da075e37ce55ea53b76a3db994197e6
URL: https://github.com/llvm/llvm-project/commit/1a5959196da075e37ce55ea53b76a3db994197e6 DIFF: https://github.com/llvm/llvm-project/commit/1a5959196da075e37ce55ea53b76a3db994197e6.diff LOG: 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) Added: Modified: libcxx/include/__config Removed: ################################################################################ diff --git a/libcxx/include/__config b/libcxx/include/__config index 8f48f16c2364..ccce227f4d6b 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 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits