|
| 1 | +commit a1fd268df893059f4213f1cd53c3a6ae55e0abad |
| 2 | +Author: q66 <q66@chimera-linux.org> |
| 3 | +Date: Wed Jan 21 13:54:39 2026 +0100 |
| 4 | + |
| 5 | + work around musl ENOSYS memery |
| 6 | + |
| 7 | + Also see the patch in python etc. |
| 8 | + |
| 9 | + maybe we should just patch libc to not be pedantic |
| 10 | + |
| 11 | +diff --git a/src/daemon.c b/src/daemon.c |
| 12 | +index c70fbab..a8cf3f3 100644 |
| 13 | +--- a/src/daemon.c |
| 14 | ++++ b/src/daemon.c |
| 15 | +@@ -622,13 +622,13 @@ int run_daemon(int argc, char *argv[]) |
| 16 | + setvbuf(stdout, NULL, _IOLBF, 0); |
| 17 | + setvbuf(stderr, NULL, _IOLBF, 0); |
| 18 | + |
| 19 | +- if (sched_getparam(0, &sp)) { |
| 20 | ++ if (syscall(__NR_sched_getparam, 0, &sp) < 0) { |
| 21 | + perror("sched_getparam"); |
| 22 | + exit(-1); |
| 23 | + } |
| 24 | + |
| 25 | + sp.sched_priority = 49; |
| 26 | +- if (sched_setscheduler(0, SCHED_FIFO, &sp)) { |
| 27 | ++ if (syscall(__NR_sched_setscheduler, 0, SCHED_FIFO, &sp) < 0) { |
| 28 | + perror("sched_setscheduler"); |
| 29 | + exit(-1); |
| 30 | + } |
| 31 | +diff --git a/src/keyd.h b/src/keyd.h |
| 32 | +index 6890dd5..c5fccce 100644 |
| 33 | +--- a/src/keyd.h |
| 34 | ++++ b/src/keyd.h |
| 35 | +@@ -32,6 +32,7 @@ |
| 36 | + #include <sched.h> |
| 37 | + #include <sys/mman.h> |
| 38 | + #include <unistd.h> |
| 39 | ++#include <syscall.h> |
| 40 | + |
| 41 | + #ifdef __FreeBSD__ |
| 42 | + #include <dev/evdev/input.h> |
0 commit comments