From c6208350d4d8c7a7f51bb6ff3152a3b54881e8d7 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Fri, 16 Jan 2015 21:34:36 -0800
Subject: [PATCH 3001/3008] Fix <local> and <iterator> when building with Lion
 and newer Availability.h

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
---
 include/iterator | 4 ++--
 include/locale   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git libcxx-5.0.1.src/include/iterator libcxx-5.0.1.src/include/iterator
index d163ab1b0..a44890712 100644
--- libcxx-5.0.1.src/include/iterator
+++ libcxx-5.0.1.src/include/iterator
@@ -1044,8 +1044,8 @@ public:
     _LIBCPP_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == 0;}
 
 #if !defined(__APPLE__) || \
-    (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_8) || \
-    (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_0)
+    (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && defined(__MAC_10_8) && __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_8) || \
+    (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && defined(__IPHONE_6_0) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_0)
 
     template <class _Ch, class _Tr>
     friend
diff --git libcxx-5.0.1.src/include/locale libcxx-5.0.1.src/include/locale
index d30d950c7..cd2869561 100644
--- libcxx-5.0.1.src/include/locale
+++ libcxx-5.0.1.src/include/locale
@@ -1372,8 +1372,8 @@ __pad_and_output(_OutputIterator __s,
 }
 
 #if !defined(__APPLE__) || \
-    (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_8) || \
-    (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_0)
+    (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && defined(__MAC_10_8) && __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_8) || \
+    (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && defined(__IPHONE_6_0) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_0)
 
 template <class _CharT, class _Traits>
 _LIBCPP_HIDDEN
-- 
2.15.1

