Subject: Add generic byte order and pointer size detection
From: Than <[email-masked]>
Date: Wed, 8 Jun 2016 19:10:08 -0400

https://sources.debian.org/patches/webrtc-audio-processing/0.3-1/Add-generic-byte-order-and-pointer-size-detection.patch/
https://bugs.freedesktop.org/show_bug.cgi?id=95738
---
 webrtc/typedefs.h | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h
index d875490..dc074f1 100644
--- a/webrtc/typedefs.h
+++ b/webrtc/typedefs.h
@@ -48,7 +48,19 @@
 #define WEBRTC_ARCH_32_BITS
 #define WEBRTC_ARCH_LITTLE_ENDIAN
 #else
-#error Please add support for your architecture in typedefs.h
+/* instead of failing, use typical unix defines... */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define WEBRTC_ARCH_BIG_ENDIAN
+#else
+#error __BYTE_ORDER__ is not defined
+#endif
+#if defined(__LP64__)
+#define WEBRTC_ARCH_64_BITS
+#else
+#define WEBRTC_ARCH_32_BITS
+#endif
 #endif
 
 #if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN))