While MUSL supports sys/prctl.h just fine, for linux/prctl.h there are some conflicts that started happening with newer Linux kernel headers.
...
In file included from /home/klipper/klipper/klippy/chelper/pyhelper.c:13:
Aug 07 03:31:56 samsung-a3 python[3556]: /usr/include/linux/prctl.h:134:8: note: originally defined here
Aug 07 03:31:56 samsung-a3 python[3556]: 134 | struct prctl_mm_map {
Aug 07 03:31:56 samsung-a3 python[3556]: | ^~~~~~~~~~~~
...
Thus, this won’t compile on MUSL-based systems.
Please consider removing linux/prctl.h, and just leaving sys/prctl.h
By the linux headers I meant linux/prctl.h which comes from linux-headers, and sys/prctl.h and which comes from musl libc.
Since both the linux header file and the musl file include the prctl_mm_map struct, there’s a conflict.
glibc includes linux/prctl.h, but musl libc implements this struct by itself.
Thus, if you include both the musl version of sys/prctl.h and linux/prctl.h, this struct will be defined twice.
It’s safe to include both sys/prctl.h and linux/prctl.h only if you’re using glibc, since here sys/prctl.h includes linux/prctl.h and linux/prctl.h has a #ifndef include guard.
Also, not a big fan of musl either, it’s just that I’m trying klipper on a phone with postMarketOS, but pmOS is based on Alpine, which is musl based.