void-packages/srcpkgs/tracker-miners/patches/fix-musl-build-tgkill.patch
2024-03-25 14:21:15 -07:00

19 lines
524 B
Diff

Fix build on musl, which doesn't provide a tgkill function due to concerns of it being misused.
(e.g. outside of signal handlers)
https://www.openwall.com/lists/musl/2019/08/02/1
--- a/src/libtracker-miners-common/tracker-seccomp.c
+++ b/src/libtracker-miners-common/tracker-seccomp.c
@@ -80,6 +81,11 @@
goto out; \
} G_STMT_END
+
+#if !defined(__GLIBC__)
+#define tgkill(pid, tid, sig) syscall(SYS_tgkill, pid, tid, sig);
+#endif
+
static void
sigsys_handler (gint signal,
siginfo_t *info,