void-packages/srcpkgs/mutter/patches/gettid.patch
Michal Vasilek d9e7fef13f mutter: fix undefined reference to gettid
Our musl package has a patch that should have made this patch unnecessary,
but it doesn't seem to work properly on armv6l-musl and armv7l-musl.
This should be investigated and properly fixed.
2022-07-07 00:55:56 +02:00

23 lines
1.1 KiB
Diff

gettid wasn't implemented in musl until 1.2.2+
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
index 2245387..2842593 100644
--- a/src/backends/native/meta-backend-native.c
+++ b/src/backends/native/meta-backend-native.c
@@ -39,6 +39,7 @@
#include "backends/native/meta-input-thread.h"
#include <stdlib.h>
+#include <syscall.h>
#include "backends/meta-cursor-tracker-private.h"
#include "backends/meta-idle-manager.h"
@@ -231,7 +232,7 @@ meta_backend_native_post_init (MetaBackend *backend)
priority = sched_get_priority_min (SCHED_RR);
meta_dbus_realtime_kit1_call_make_thread_realtime_sync (rtkit_proxy,
- gettid (),
+ (pid_t) syscall (SYS_gettid),
priority,
NULL,
&error);