diff --git a/srcpkgs/trace-cmd/patches/musl-__bswap64.patch b/srcpkgs/trace-cmd/patches/musl-__bswap64.patch new file mode 100644 index 0000000000..46713c4880 --- /dev/null +++ b/srcpkgs/trace-cmd/patches/musl-__bswap64.patch @@ -0,0 +1,16 @@ +--- 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) diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch new file mode 100644 index 0000000000..df85bfa503 --- /dev/null +++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch @@ -0,0 +1,40 @@ +--- include/tracefs/tracefs.h 2020-07-17 17:14:20.000000000 +0200 ++++ include/tracefs/tracefs.h 2020-07-18 16:27:27.559697340 +0200 +@@ -6,6 +6,7 @@ + #ifndef _TRACE_FS_H + #define _TRACE_FS_H + ++#include + #include "traceevent/event-parse.h" + + char *tracefs_get_tracing_file(const char *name); +--- lib/trace-cmd/trace-plugin.c 2020-07-17 17:14:20.000000000 +0200 ++++ lib/trace-cmd/trace-plugin.c 2020-07-18 16:33:40.323675122 +0200 +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + #include + #include + #include "trace-cmd.h" +--- tracecmd/trace-agent.c 2020-07-17 17:14:20.000000000 +0200 ++++ tracecmd/trace-agent.c 2020-07-18 16:35:53.882667161 +0200 +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- tracecmd/trace-setup-guest.c 2020-07-17 17:14:20.000000000 +0200 ++++ tracecmd/trace-setup-guest.c 2020-07-18 16:37:29.463661464 +0200 +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "trace-local.h" + #include "trace-msg.h" diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch new file mode 100644 index 0000000000..58fa2de624 --- /dev/null +++ b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch @@ -0,0 +1,24 @@ +--- tracecmd/trace-tsync.c 2020-07-17 17:14:20.000000000 +0200 ++++ tracecmd/trace-tsync.c 2020-07-18 16:41:53.175645746 +0200 +@@ -104,8 +104,10 @@ + + pthread_attr_init(&attrib); + pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); ++#if defined(__GLIBC__) + if (!get_first_cpu(&pin_mask, &mask_size)) + pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); ++#endif + + ret = pthread_create(&instance->tsync_thread, &attrib, + tsync_host_thread, &instance->tsync); +@@ -243,8 +245,10 @@ + pthread_attr_init(&attrib); + tsync->sync_proto = proto; + pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); ++#if defined(__GLIBC__) + if (!get_first_cpu(&pin_mask, &mask_size)) + pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); ++#endif + + ret = pthread_create(thr_id, &attrib, tsync_agent_thread, tsync); + diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch new file mode 100644 index 0000000000..e3a08d753a --- /dev/null +++ b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch @@ -0,0 +1,10 @@ +--- include/trace-cmd/trace-cmd.h 2020-07-17 17:14:20.000000000 +0200 ++++ include/trace-cmd/trace-cmd.h 2020-07-18 16:23:27.984711620 +0200 +@@ -6,6 +6,7 @@ + #ifndef _TRACE_CMD_H + #define _TRACE_CMD_H + ++#include + #include "traceevent/event-parse.h" + + #define TRACECMD_MAGIC { 23, 8, 68 }