Skip to content

Commit dc0158e

Browse files
author
runrevali
committed
[[ Bug 13000 ]] __LITTLE_ENDIAN__ not defined for Android in libgraphics
1 parent 9ac1046 commit dc0158e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/notes/bugfix-13000.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Image colours not showing correctly on Android device

libcore/include/core.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,17 @@ typedef __builtin_va_list va_list;
122122
typedef uint32_t size_t;
123123
#endif
124124

125+
// AL-2014-07-30: [[ Bug 13000 ]] Ensure ___LITTLE_ENDIAN__ is defined appropriately
126+
#ifdef __ppc__
127+
#undef __LITTLE_ENDIAN__
128+
#undef __BIG_ENDIAN__
129+
#define __BIG_ENDIAN__ 1
130+
#else
131+
#undef __LITTLE_ENDIAN__
132+
#undef __BIG_ENDIAN__
133+
#define __LITTLE_ENDIAN__ 1
134+
#endif
135+
125136
////////////////////////////////////////////////////////////////////////////////
126137

127138
#ifdef _DEBUG

0 commit comments

Comments
 (0)