blob: 62b24a5f15154ac3d6c2c1a84fd1112c46c37e36 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From 0da9cc40f861293db7baba3854b44d73658b168d Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Wed, 22 May 2019 13:18:53 +0200
Subject: [PATCH] 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.
diff --git a/arch/powerpc/bits/alltypes.h.in b/arch/powerpc/bits/alltypes.h.in
--- a/arch/powerpc/bits/alltypes.h.in
+++ b/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;
|