void-packages/srcpkgs/trace-cmd/patches/musl-__bswap64.patch

17 lines
457 B
Diff

--- lib/trace-cmd/include/trace-cmd-local.h 2020-07-17 17:14:20.000000000 +0200
+++ lib/trace-cmd/include/trace-cmd-local.h 2020-07-18 16:31:32.060682767 +0200
@@ -18,8 +18,13 @@
#ifndef htonll
# if __BYTE_ORDER == __LITTLE_ENDIAN
+#if defined(__GLIBC__)
#define htonll(x) __bswap_64(x)
#define ntohll(x) __bswap_64(x)
+#else
+#define htonll(x) __bswap64(x)
+#define ntohll(x) __bswap64(x)
+#endif
#else
#define htonll(x) (x)
#define ntohll(x) (x)