void-packages/srcpkgs/musl/patches/powerpc-wchar-t.patch

20 lines
514 B
Diff
Raw Normal View History

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;