musl: properly deal with wchar_t definition on 32-bit powerpc
Clang defines it to be int, gcc defines it to be long. The old code results in conflicts when building things with clang. This same change is already incorporated for i386 in musl upstream, so apply it to powerpc as well.
This commit is contained in:
parent
1e2a36be21
commit
0da9cc40f8
1 changed files with 19 additions and 0 deletions
19
srcpkgs/musl/patches/powerpc-wchar-t.patch
Normal file
19
srcpkgs/musl/patches/powerpc-wchar-t.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
Clang defines wchar_t as int, gcc as long on the target. They have the same
|
||||
size, but are different types. i386 already has this same change, do it for
|
||||
powerpc as well.
|
||||
|
||||
--- arch/powerpc/bits/alltypes.h.in
|
||||
+++ arch/powerpc/bits/alltypes.h.in
|
||||
@@ -6,8 +6,12 @@ TYPEDEF __builtin_va_list va_list;
|
||||
TYPEDEF __builtin_va_list __isoc_va_list;
|
||||
|
||||
#ifndef __cplusplus
|
||||
+#ifdef __WCHAR_TYPE__
|
||||
+TYPEDEF __WCHAR_TYPE__ wchar_t;
|
||||
+#else
|
||||
TYPEDEF long wchar_t;
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
TYPEDEF float float_t;
|
||||
TYPEDEF double double_t;
|
Loading…
Reference in a new issue