Fix endian conditions on Solaris. From Alexander Esilevich.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188613 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/int_endianness.h b/lib/int_endianness.h
index edb58c8..a64f926 100644
--- a/lib/int_endianness.h
+++ b/lib/int_endianness.h
@@ -19,13 +19,15 @@
#if defined(__SVR4) && defined(__sun)
#include <sys/byteorder.h>
-#if _BYTE_ORDER == _BIG_ENDIAN
+#if defined(_BIG_ENDIAN)
#define _YUGA_LITTLE_ENDIAN 0
#define _YUGA_BIG_ENDIAN 1
-#elif _BYTE_ORDER == _LITTLE_ENDIAN
+#elif defined(_LITTLE_ENDIAN)
#define _YUGA_LITTLE_ENDIAN 1
#define _YUGA_BIG_ENDIAN 0
-#endif /* _BYTE_ORDER */
+#else /* !_LITTLE_ENDIAN */
+#error "unknown endianness"
+#endif /* !_LITTLE_ENDIAN */
#endif /* Solaris and AuroraUX. */