summaryrefslogtreecommitdiffstats
path: root/common/arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/arch.h')
-rw-r--r--common/arch.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/arch.h b/common/arch.h
index 9fbca952..f928e590 100644
--- a/common/arch.h
+++ b/common/arch.h
@@ -19,10 +19,12 @@
#if !defined(ARCH_H)
#define ARCH_H
+#include <endian.h>
+
#if !(defined(L_ENDIAN) || defined(B_ENDIAN))
/* check endianess */
#if defined(__sparc__) || defined(__PPC__) || defined(__ppc__) || \
- defined(__hppa__)
+ defined(__hppa__) || (BYTE_ORDER == BIG_ENDIAN)
#define B_ENDIAN
#else
#define L_ENDIAN