summaryrefslogtreecommitdiffstats
path: root/base/data_pack.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/data_pack.cc')
-rw-r--r--base/data_pack.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/data_pack.cc b/base/data_pack.cc
index 17db8c4..f41c6da 100644
--- a/base/data_pack.cc
+++ b/base/data_pack.cc
@@ -91,8 +91,14 @@ bool DataPack::Load(const FilePath& path) {
bool DataPack::Get(uint32_t resource_id, StringPiece* data) {
// It won't be hard to make this endian-agnostic, but it's not worth
// bothering to do right now.
+#if defined(__BYTE_ORDER)
+ // Linux check
COMPILE_ASSERT(__BYTE_ORDER == __LITTLE_ENDIAN,
datapack_assumes_little_endian);
+#elif defined(__BIG_ENDIAN__)
+ // Mac check
+ #error DataPack assumes little endian
+#endif
DataPackEntry* target = reinterpret_cast<DataPackEntry*>(
bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_,