[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 14:58:07 PDT 2023


sthibaul updated this revision to Diff 552898.
sthibaul added a comment.

Use __gnu_hurd__ instead  of __GNU__


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158584/new/

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_hurd__) || (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_hurd__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
 # define _LIBCPP_HAS_CLOCK_GETTIME
 #endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158584.552898.patch
Type: text/x-patch
Size: 965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230823/6f87be2a/attachment.bin>


More information about the libcxx-commits mailing list