--- sqlite-src-3360000/src/sqliteInt.h.orig	2021-06-18 20:52:13.000000000 +0200
+++ sqlite-src-3360000/src/sqliteInt.h	2021-10-03 19:24:40.265785108 +0200
@@ -890,9 +890,10 @@
 # if defined(i386)      || defined(__i386__)      || defined(_M_IX86) ||    \
      defined(__x86_64)  || defined(__x86_64__)    || defined(_M_X64)  ||    \
      defined(_M_AMD64)  || defined(_M_ARM)        || defined(__x86)   ||    \
-     defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)
+     defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)||    \
+     (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
 #   define SQLITE_BYTEORDER    1234
-# elif defined(sparc)     || defined(__ppc__) || \
+# elif defined(sparc)     || (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || \
        defined(__ARMEB__) || defined(__AARCH64EB__)
 #   define SQLITE_BYTEORDER    4321
 # else
--- sqlite-src-3360000/ext/rtree/rtree.c.orig	2021-06-18 20:52:13.000000000 +0200
+++ sqlite-src-3360000/ext/rtree/rtree.c	2021-10-03 19:25:03.769105530 +0200
@@ -450,9 +450,9 @@
 #if defined(i386)     || defined(__i386__)   || defined(_M_IX86) ||    \
     defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)  ||    \
     defined(_M_AMD64) || defined(_M_ARM)     || defined(__x86)   ||    \
-    defined(__arm__)
+    defined(__arm__)  || (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
 # define SQLITE_BYTEORDER    1234
-#elif defined(sparc)    || defined(__ppc__)
+#elif defined(sparc)    || (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
 # define SQLITE_BYTEORDER    4321
 #else
 # define SQLITE_BYTEORDER    0     /* 0 means "unknown at compile-time" */
