bswap{16,32,64}. Checking whether it actually works is left as an exercise to the reader..
20 lines
699 B
Plaintext
20 lines
699 B
Plaintext
$OpenBSD: patch-libexfat_platform_h,v 1.1 2016/08/06 06:53:44 landry Exp $
|
|
|
|
Unbreak on little-endian archs
|
|
|
|
--- libexfat/platform.h.orig Sat Aug 6 08:50:22 2016
|
|
+++ libexfat/platform.h Sat Aug 6 08:50:40 2016
|
|
@@ -49,9 +49,9 @@
|
|
#elif defined(__FreeBSD__) || defined(__DragonFlyBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
|
|
|
#include <sys/endian.h>
|
|
-#define exfat_bswap16(x) bswap16(x)
|
|
-#define exfat_bswap32(x) bswap32(x)
|
|
-#define exfat_bswap64(x) bswap64(x)
|
|
+#define exfat_bswap16(x) swap16(x)
|
|
+#define exfat_bswap32(x) swap32(x)
|
|
+#define exfat_bswap64(x) swap64(x)
|
|
#define EXFAT_BYTE_ORDER _BYTE_ORDER
|
|
#define EXFAT_LITTLE_ENDIAN _LITTLE_ENDIAN
|
|
#define EXFAT_BIG_ENDIAN _BIG_ENDIAN
|