void-packages/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaff...

25 lines
845 B
Diff

--- 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);