summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2019-03-03 06:36:13 -0600
committerTimothy Pearson <tpearson@raptorengineering.com>2019-03-04 08:04:29 -0600
commit02ed98539c5e7f9eee883d07ca0acaa507f7a75a (patch)
tree171e6aa70713fde39fb11162d9d2c6b744e3ec98
parent32dd179685062276c10a2b719b2be099a695de4c (diff)
downloadxrdp-proprietary-02ed98539c5e7f9eee883d07ca0acaa507f7a75a.tar.gz
xrdp-proprietary-02ed98539c5e7f9eee883d07ca0acaa507f7a75a.zip
Fix endianness checks on ppc64
-rw-r--r--common/arch.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/common/arch.h b/common/arch.h
index e04504f0..ad2cd216 100644
--- a/common/arch.h
+++ b/common/arch.h
@@ -21,11 +21,19 @@
#if !(defined(L_ENDIAN) || defined(B_ENDIAN))
/* check endianess */
-#if defined(__sparc__) || defined(__PPC__) || defined(__ppc__) || \
- defined(__hppa__)
-#define B_ENDIAN
+#if defined(__powerpc64__)
+# if defined(__BIG_ENDIAN__)
+# define B_ENDIAN
+# else
+# define L_ENDIAN
+# endif
#else
-#define L_ENDIAN
+# if defined(__sparc__) || defined(__PPC__) || defined(__ppc__) || \
+ defined(__hppa__)
+# define B_ENDIAN
+# else
+# define L_ENDIAN
+# endif
#endif
/* check if we need to align data */
#if defined(__sparc__) || defined(__alpha__) || defined(__hppa__) || \