If sched.h is in a folder added to the include path on Linux and WSL e.g. by gcc -Iinclude then <pthread.h> will attempt to include this sched.h rather than the system one. This can be tested by just compiling the sched demo whilst including sched.h from a different folder. It may be sensible to rename sched.h, perhaps back to mm_sched.h, or scheduler.h, so it doesn't clash with system headers when -I is used.