diff options
author | Timothy Pearson <tpearson@raptorengineering.com> | 2019-03-03 06:36:13 -0600 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-03-03 06:36:13 -0600 |
commit | 5bfe503c1ff176683cf9b42848f12971204eda31 (patch) | |
tree | 64f33f167eaf85ba99449ff7b0d363c00ce76baf | |
parent | cf2264a7ac6f3025b4e0f3935201cdf13ac4d960 (diff) | |
download | xrdp-proprietary-5bfe503c1ff176683cf9b42848f12971204eda31.tar.gz xrdp-proprietary-5bfe503c1ff176683cf9b42848f12971204eda31.zip |
Fix endianness checks on ppc64
-rw-r--r-- | common/arch.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/common/arch.h b/common/arch.h index a380511b..38bc6f25 100644 --- a/common/arch.h +++ b/common/arch.h @@ -26,11 +26,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__) || \ |