aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/ctime
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/ctime')
-rw-r--r--libcxx/include/ctime6
1 files changed, 2 insertions, 4 deletions
diff --git a/libcxx/include/ctime b/libcxx/include/ctime
index 8b2efd7449ca..779187d0ef51 100644
--- a/libcxx/include/ctime
+++ b/libcxx/include/ctime
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===---------------------------- ctime -----------------------------------===//
+//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -59,7 +59,7 @@ int timespec_get( struct timespec *ts, int base); // C++17
// we're detecting this here instead of in <__config> because we can't include
// system headers from <__config>, since it leads to circular module dependencies.
// This is also meant to be a very temporary workaround until the SDKs are fixed.
-#if defined(__APPLE__)
+#if defined(__APPLE__) && !__has_attribute(using_if_exists)
# include <sys/cdefs.h>
# if defined(_LIBCPP_HAS_TIMESPEC_GET) && (__DARWIN_C_LEVEL < __DARWIN_C_FULL)
# define _LIBCPP_HAS_TIMESPEC_GET_NOT_ACTUALLY_PROVIDED
@@ -79,12 +79,10 @@ using ::clock _LIBCPP_USING_IF_EXISTS;
using ::difftime _LIBCPP_USING_IF_EXISTS;
using ::mktime _LIBCPP_USING_IF_EXISTS;
using ::time _LIBCPP_USING_IF_EXISTS;
-#ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
using ::asctime _LIBCPP_USING_IF_EXISTS;
using ::ctime _LIBCPP_USING_IF_EXISTS;
using ::gmtime _LIBCPP_USING_IF_EXISTS;
using ::localtime _LIBCPP_USING_IF_EXISTS;
-#endif
using ::strftime _LIBCPP_USING_IF_EXISTS;
#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_TIMESPEC_GET) && !defined(_LIBCPP_HAS_TIMESPEC_GET_NOT_ACTUALLY_PROVIDED)
using ::timespec_get _LIBCPP_USING_IF_EXISTS;