summaryrefslogtreecommitdiff
path: root/libraries/pjproject-ring/patches/endianness.patch
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/pjproject-ring/patches/endianness.patch')
-rw-r--r--libraries/pjproject-ring/patches/endianness.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/libraries/pjproject-ring/patches/endianness.patch b/libraries/pjproject-ring/patches/endianness.patch
new file mode 100644
index 0000000000..84b9499448
--- /dev/null
+++ b/libraries/pjproject-ring/patches/endianness.patch
@@ -0,0 +1,19 @@
+diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h
+index 10f86fd..4ace1bc 100644
+--- a/pjlib/include/pj/config.h
++++ b/pjlib/include/pj/config.h
+@@ -245,7 +245,13 @@
+ # define PJ_M_NAME "armv4"
+ # define PJ_HAS_PENTIUM 0
+ # if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
+-# error Endianness must be declared for this processor
++# if defined(__GNUC__)
++# include <endian.h>
++# define PJ_IS_LITTLE_ENDIAN __BYTE_ORDER__ == __LITTLE_ENDIAN__
++# define PJ_IS_BIG_ENDIAN __BYTE_ORDER__ == __BIG_ENDIAN__
++# else
++# error Endianness must be declared for this processor
++# endif
+ # endif
+
+ #elif defined (PJ_M_POWERPC) || defined(__powerpc) || defined(__powerpc__) || \