[libcxx-commits] [libcxx] d7550e5 - [libcxx] Fix a case of -Wundef warnings regarding _POSIX_TIMERS

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 17 03:02:47 PDT 2021


Author: Martin Storsjö
Date: 2021-06-17T13:02:34+03:00
New Revision: d7550e5d105f998ea34bd6c51c03d37a8c546025

URL: https://github.com/llvm/llvm-project/commit/d7550e5d105f998ea34bd6c51c03d37a8c546025
DIFF: https://github.com/llvm/llvm-project/commit/d7550e5d105f998ea34bd6c51c03d37a8c546025.diff

LOG: [libcxx] Fix a case of -Wundef warnings regarding _POSIX_TIMERS

Differential Revision: https://reviews.llvm.org/D104372

Added: 
    

Modified: 
    libcxx/src/chrono.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/src/chrono.cpp b/libcxx/src/chrono.cpp
index 096fce3cdd28..13b375947b4d 100644
--- a/libcxx/src/chrono.cpp
+++ b/libcxx/src/chrono.cpp
@@ -31,7 +31,7 @@
 # include <sys/time.h> // for gettimeofday and timeval
 #endif
 
-#if !defined(__APPLE__) && _POSIX_TIMERS > 0
+#if !defined(__APPLE__) && defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0
 # define _LIBCPP_USE_CLOCK_GETTIME
 #endif
 


        


More information about the libcxx-commits mailing list