about summary refs log tree commit diff
path: root/sysdeps/mips/bits/endian.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mips/bits/endian.h')
-rw-r--r--sysdeps/mips/bits/endian.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/mips/bits/endian.h b/sysdeps/mips/bits/endian.h
index 40321a2866..9586104ccd 100644
--- a/sysdeps/mips/bits/endian.h
+++ b/sysdeps/mips/bits/endian.h
@@ -5,4 +5,9 @@
 # error "Never use <bits/endian.h> directly; include <endian.h> instead."
 #endif
 
-#define __BYTE_ORDER __BIG_ENDIAN
+#if __MIPSEB
+# define __BYTE_ORDER __BIG_ENDIAN
+#endif
+#if __MIPSEL
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#endif