aboutsummaryrefslogtreecommitdiffstats
path: root/main/mpg123/fix-s390x.patch
blob: 90b4394a17757d6cc98dfc01bd0fa8c1cf567a34 (plain)
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
27
28
Upstream: No (lives in sourceforge)
Reason: Fixes compilation on big endian systems

diff --git a/src/libout123/hextxt.c b/src/libout123/hextxt.c
index 45c8134..f87c0dc 100644
--- a/src/libout123/hextxt.c
+++ b/src/libout123/hextxt.c
@@ -194,6 +194,7 @@ int txt_write(out123_handle *ao, unsigned char *buf, int len)
 #define CHANPRINT24(type, ptype, fmt) \
 	{ \
 		unsigned char *ff = f; \
+		int c; \
 		for(c=0; c<ao->channels; ++c) \
 		{ \
 			uint32_t tmp = 0; \
diff --git a/src/libmpg123/sample.h b/src/libmpg123/sample.h
index 5a98fe0..4d244fe 100644
--- a/src/libmpg123/sample.h
+++ b/src/libmpg123/sample.h
@@ -185,7 +185,7 @@ static inline int16_t ftoi16(float x)
 #ifdef WORDS_BIGENDIAN
 /* Highest byte first. Drop last. */
 #define DROP4BYTE(w,r) {(w)[0]=(r)[0]; (w)[1]=(r)[1]; (w)[2]=(r)[2];}
-#define ADD4BYTE(w,r)  {(w)[0]=(r)[0]; (w)[1]=(r)[1]; (w)[2]=(r)[2]; (w)[3]=0}
+#define ADD4BYTE(w,r)  {(w)[0]=(r)[0]; (w)[1]=(r)[1]; (w)[2]=(r)[2]; (w)[3]=0;}
 #else
 /* Lowest byte first, drop that. */
 #define DROP4BYTE(w,r) {(w)[0]=(r)[1]; (w)[1]=(r)[2]; (w)[2]=(r)[3];}