[libcxx-commits] [PATCH] D158584: [libc++] Fix GNU/Hurd build
Samuel Thibault via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 23 00:32:36 PDT 2023
sthibaul created this revision.
sthibaul added reviewers: ldionne, phosek.
Herald added a subscriber: krytarowski.
Herald added a project: All.
sthibaul requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
GNU/Hurd does have clock_gettime, it just doesn't define _POSIX_TIMERS because its support for timers is not complete.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158584
Files:
libcxx/src/chrono.cpp
libcxx/src/filesystem/filesystem_clock.cpp
Index: libcxx/src/filesystem/filesystem_clock.cpp
===================================================================
--- libcxx/src/filesystem/filesystem_clock.cpp
+++ libcxx/src/filesystem/filesystem_clock.cpp
@@ -29,7 +29,7 @@
# include <sys/time.h> // for gettimeofday and timeval
#endif
-#if defined(__APPLE__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
+#if defined(__APPLE__) || defined (__GNU__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
# define _LIBCPP_HAS_CLOCK_GETTIME
#endif
Index: libcxx/src/chrono.cpp
===================================================================
--- libcxx/src/chrono.cpp
+++ libcxx/src/chrono.cpp
@@ -31,7 +31,7 @@
# include <sys/time.h> // for gettimeofday and timeval
#endif
-#if defined(__APPLE__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
+#if defined(__APPLE__) || defined (__GNU__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
# define _LIBCPP_HAS_CLOCK_GETTIME
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158584.552611.patch
Type: text/x-patch
Size: 955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230823/a4d72fb6/attachment-0001.bin>
More information about the libcxx-commits
mailing list