summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorKoichiro IWAO <meta@vmeta.jp>2014-08-12 18:04:26 +0900
committerKoichiro IWAO <meta@vmeta.jp>2014-08-12 18:04:26 +0900
commitdd979731c41d84d5e11cad418d55e4716e8fb4f2 (patch)
treee4ddb651bdb208d044ce1eb06aa371dc3e4f3822 /common
parenta6d71388c8644dda0e3e45f1018fc2b10a621540 (diff)
downloadxrdp-proprietary-dd979731c41d84d5e11cad418d55e4716e8fb4f2.tar.gz
xrdp-proprietary-dd979731c41d84d5e11cad418d55e4716e8fb4f2.zip
common: fix check for big endian arches
Fix for: https://bugzilla.redhat.com/show_bug.cgi?id=905411
Diffstat (limited to 'common')
-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