summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-09-11 10:16:30 -0400
committerRich Felker <dalias@aerifal.cx>2014-09-11 10:16:30 -0400
commitbd082916b110c0c49e71bc83ff68dfd88bb8313a (patch)
tree5a1812c7916473114cb0d2cf93d5ddfaf5bd68b5 /arch
parent5edbc6fe13e1e0f27e3d3a20f2582da476f74c4b (diff)
downloadmusl-bd082916b110c0c49e71bc83ff68dfd88bb8313a.tar.gz
musl-bd082916b110c0c49e71bc83ff68dfd88bb8313a.tar.bz2
musl-bd082916b110c0c49e71bc83ff68dfd88bb8313a.tar.xz
musl-bd082916b110c0c49e71bc83ff68dfd88bb8313a.zip
fix C++ incompatibility in i386 definition of max_align_t
the C11 _Alignas keyword is not present in C++, and despite it being in the reserved namespace and thus reasonable to support even in non-C11 modes, compilers seem to fail to support it.
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/bits/alltypes.h.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/i386/bits/alltypes.h.in b/arch/i386/bits/alltypes.h.in
index a7882ed5..646922b1 100644
--- a/arch/i386/bits/alltypes.h.in
+++ b/arch/i386/bits/alltypes.h.in
@@ -27,7 +27,11 @@ TYPEDEF long double float_t;
TYPEDEF long double double_t;
#endif
+#ifdef __cplusplus
+TYPEDEF struct { alignas(8) long long __ll; long double __ld; } max_align_t;
+#else
TYPEDEF struct { _Alignas(8) long long __ll; long double __ld; } max_align_t;
+#endif
TYPEDEF long time_t;
TYPEDEF long suseconds_t;