Sched_setscheduler and musl compatibility?

Hi,
I have a somewhat special case where I want to run Klipper Linux Host under Alpine Linux for a multi-MCU setup (it’s somewhat more involved, but I think that is the basic explanation). If I compile for Linux Host and run klipper_mcu -r I get the following error:

Got error -1 in sched_setscheduler: (38)Function not implemented

I saw a post about using pthread instead, not sure which source I originally found but this is one of them: musl - Re: sched_* implemented? (openwall.com). So, to get past the issue I’ve done two modifications to the code but I don’t know enough about how to test if this works properly and what other implications it could have. The changes are to klipper/main.c at master · Klipper3d/klipper (github.com):

  • Add #import <pthread.h>
  • Replace sched_setscheduler(0 with pthread_setschedparam(pthread_self().

My question is if it would be possible to make Klipper Linux host compatible with musl / Alpine Linux, for instance with a change as above? And, if possible, what would be the correct way to proceed?