Skip to content

Commit

Permalink
mixxx: add missing patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
alarixnia committed Dec 13, 2021
1 parent 968f670 commit 3274e59
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions audio/mixxx/patches/patch-lib_kaitai_kaitaistream.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
$NetBSD: patch-lib_kaitai_kaitaistream.cpp,v 1.1 2021/12/13 17:24:38 nia Exp $

Portability...

--- lib/kaitai/kaitaistream.cpp.orig 2021-09-29 13:23:02.000000000 +0000
+++ lib/kaitai/kaitaistream.cpp
@@ -17,9 +17,17 @@
#define bswap_16(x) _byteswap_ushort(x)
#define bswap_32(x) _byteswap_ulong(x)
#define bswap_64(x) _byteswap_uint64(x)
-#else // !__APPLE__ or !_MSC_VER
+#elif defined(__linux__)
#include <endian.h>
#include <byteswap.h>
+#else // !__APPLE__ or !_MSC_VER
+#include <endian.h>
+#define bswap_16(x) bswap16(x)
+#define bswap_32(x) bswap32(x)
+#define bswap_64(x) bswap64(x)
+#define __BYTE_ORDER BYTE_ORDER
+#define __BIG_ENDIAN BIG_ENDIAN
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
#endif

#include <iostream>

0 comments on commit 3274e59

Please sign in to comment.