diff options
| author | 2010-09-16 23:51:31 -0700 | |
|---|---|---|
| committer | 2010-09-16 23:51:31 -0700 | |
| commit | 3fcfb4e68bdbac5282fae1b710f5f60481f4c3ff (patch) | |
| tree | 7400539746038f7c4f8603c749065ef72400b4be | |
| parent | 92f2512e41209e21ad8cfaa6c45451ceb964c59a (diff) | |
| parent | ce802e33d498c5a87f7abc904d2741c8257d80ac (diff) | |
am 987ba541: Merge "Fix sim-eng build on Hardy" into gingerbread
Merge commit '987ba54127caaaa87056965b3d98b7e1a5b110b7' into gingerbread-plus-aosp
* commit '987ba54127caaaa87056965b3d98b7e1a5b110b7':
Fix sim-eng build on Hardy
| -rw-r--r-- | libs/ui/GraphicLog.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/ui/GraphicLog.cpp b/libs/ui/GraphicLog.cpp index b55ce2342b..7ba2779d1c 100644 --- a/libs/ui/GraphicLog.cpp +++ b/libs/ui/GraphicLog.cpp @@ -30,7 +30,11 @@ ANDROID_SINGLETON_STATIC_INSTANCE(GraphicLog) static inline void writeInt32(uint8_t* base, size_t& pos, int32_t value) { +#ifdef HAVE_LITTLE_ENDIAN + int32_t v = value; +#else int32_t v = htole32(value); +#endif base[pos] = EVENT_TYPE_INT; memcpy(&base[pos+1], &v, sizeof(int32_t)); pos += 1+sizeof(int32_t); @@ -38,7 +42,11 @@ void writeInt32(uint8_t* base, size_t& pos, int32_t value) { static inline void writeInt64(uint8_t* base, size_t& pos, int64_t value) { +#ifdef HAVE_LITTLE_ENDIAN + int64_t v = value; +#else int64_t v = htole64(value); +#endif base[pos] = EVENT_TYPE_LONG; memcpy(&base[pos+1], &v, sizeof(int64_t)); pos += 1+sizeof(int64_t); |