mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-25 11:22:30 +01:00
some packages (nvramtool, ectool) are still intended for x86-based systems and some packages only work on 64-bit systems adding a patch for cbmem
20 lines
473 B
Diff
20 lines
473 B
Diff
diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c
|
|
index 018ea871f9..369b7c5a31 100644
|
|
--- a/util/cbmem/cbmem.c
|
|
+++ b/util/cbmem/cbmem.c
|
|
@@ -28,6 +28,14 @@
|
|
#include <x86intrin.h>
|
|
#endif
|
|
|
|
+#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
|
+#define le32toh(x) (x)
|
|
+#define le16toh(x) (x)
|
|
+#else
|
|
+#define le32toh(x) (__builtin_bswap32(x))
|
|
+#define le16toh(x) (__builtin_bswap16(x))
|
|
+#endif
|
|
+
|
|
#include "cbmem_util.h"
|
|
|
|
#define CBMEM_VERSION "1.2"
|