From 63cf77ffc453f34bcfe4a085b95a24f1bdd068f5 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <barracuda@macos-powerpc.org>
Date: Wed, 14 Aug 2024 19:02:15 +0800
Subject: [PATCH] snappy/compat.h: fix Big-endian on Apple

---
 lib/snappy-fef67ac/compat.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git lib/snappy-fef67ac/compat.h lib/snappy-fef67ac/compat.h
index 3b755f495..afa127507 100644
--- lib/snappy-fef67ac/compat.h
+++ lib/snappy-fef67ac/compat.h
@@ -5,14 +5,14 @@
 #ifdef __FreeBSD__
 #  include <sys/endian.h>
 #elif defined(__APPLE_CC_) || defined(__MACH__)  /* MacOS/X support */
-#  include <machine/endian.h>
+#  include <libkern/OSByteOrder.h>
 
 #if    __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
 #  define	htole16(x) (x)
 #  define	le32toh(x) (x)
 #elif  __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN
-#  define	htole16(x) __DARWIN_OSSwapInt16(x)
-#  define	le32toh(x) __DARWIN_OSSwapInt32(x)
+#  define	htole16(x) OSSwapInt16(x)
+#  define	le32toh(x) OSSwapInt32(x)
 #else
 #  error "Endianness is undefined"
 #endif
-- 
2.46.0

