forked from mirrors/nixpkgs
44cb95a234
This is very similar to what we had in bb0b0822ef
.
The xlocale.h header is no longer existing in glibc version 2.26, so we
need to avoid including it.
I've tested building against all of the libcxx attributes of LLVM 3.5,
3.7, 3.8, 3.9, 4 and 5.
All of them succeeded except version 3.5, which failed because of an
unrelated issue (build of libc++abi has failed, one of its
dependencies), so I only verified whether the patch applies cleanly.
Signed-off-by: aszlig <aszlig@nix.build>
Cc: @vcunat
18 lines
718 B
Diff
18 lines
718 B
Diff
diff --git a/include/__locale b/include/__locale
|
|
index 3daa1f1..cb8e151 100644
|
|
--- a/include/__locale
|
|
+++ b/include/__locale
|
|
@@ -29,10 +29,10 @@
|
|
# if __ANDROID_API__ <= 20
|
|
# include <support/android/locale_bionic.h>
|
|
# endif
|
|
-#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \
|
|
+#elif (defined(__APPLE__) || defined(__FreeBSD__) \
|
|
|| defined(__sun__) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
|
|
# include <xlocale.h>
|
|
-#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
|
|
+#endif // __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
|
|
|
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
|
#pragma GCC system_header
|