aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libc++/check-for-musl-libcs-max_align_t.patch
diff options
context:
space:
mode:
authorShiz <hi@shiz.me>2017-05-14 22:53:53 +0000
committerJakub Jirutka <jakub@jirutka.cz>2017-05-16 18:17:06 +0200
commit6b711aaa81a9f16d46f61847e8d53f292c7b15a8 (patch)
treec7a473d833b27dac12e9d671268c3e61703012f8 /testing/libc++/check-for-musl-libcs-max_align_t.patch
parent8cb3112594f10a8cee5b5412c28a846acb63167f (diff)
downloadaports-6b711aaa81a9f16d46f61847e8d53f292c7b15a8.tar.bz2
aports-6b711aaa81a9f16d46f61847e8d53f292c7b15a8.tar.xz
testing/libc++: new aport
http://libcxx.llvm.org/ A new implementation of the C++ standard library, targeting C++11.
Diffstat (limited to 'testing/libc++/check-for-musl-libcs-max_align_t.patch')
-rw-r--r--testing/libc++/check-for-musl-libcs-max_align_t.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/libc++/check-for-musl-libcs-max_align_t.patch b/testing/libc++/check-for-musl-libcs-max_align_t.patch
new file mode 100644
index 0000000000..467306949a
--- /dev/null
+++ b/testing/libc++/check-for-musl-libcs-max_align_t.patch
@@ -0,0 +1,18 @@
+libc++'s stddef.h uses non-standard macros to detect if max_align_t exists,
+which break on musl. We reluctantly add musl's non-public macro the list
+for now, but this should be fixed more fundamentally.
+
+diff --git a/libcxx/include/stddef.h b/libcxx/include/stddef.h
+index 8841bbe..faf8552 100644
+--- a/libcxx/include/stddef.h
++++ b/libcxx/include/stddef.h
+@@ -53,7 +53,8 @@ using std::nullptr_t;
+ }
+
+ // Re-use the compiler's <stddef.h> max_align_t where possible.
+-#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T)
++#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T) && \
++ !defined(__DEFINED_max_align_t)
+ typedef long double max_align_t;
+ #endif
+