aboutsummaryrefslogtreecommitdiffstats
path: root/community/deadbeef/ppc64le.patch
blob: d8106c77a7a771de7e36ba5e7499536052226097 (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
Author: Breno Leitao <breno.leitao@gmail.com>
Date:   Fri Apr 7 22:00:01 2017 +0000

    blargg_endian: Fails to build on non-x86 with musl
    
    Currently blargg_endian fails to detect endiness on non-x86, as ppc64le,
    when not using glibc.
    
    In my case, I am using musl on ppc64le, and deadbeef fails to compile
    because the endianess is not known.
    
    This patch defines BLARGG_LITTLE_ENDIAN if the system is ppc64le.

--- a/plugins/gme/game-music-emu-0.6pre/gme/blargg_endian.h
+++ b/plugins/gme/game-music-emu-0.6pre/gme/blargg_endian.h
@@ -16,6 +16,9 @@
 		defined (__POWERPC__) || defined (__powerc)
 	#define BLARGG_CPU_POWERPC 1
 	#define BLARGG_CPU_RISC 1
+	#if defined(__LITTLE_ENDIAN__)
+		#define BLARGG_LITTLE_ENDIAN 1
+	#endif
 #endif
 
 // BLARGG_BIG_ENDIAN, BLARGG_LITTLE_ENDIAN: Determined automatically, otherwise only