__signalhandler_t isn't defined on musl, one needs to drill down to bare type definition so code builds both on glibc and musl systems https://bugs.gentoo.org/924114 --- a/window.c +++ b/window.c @@ -833,7 +833,7 @@ char imageInWindow (Display *disp, int scrn, Image *image, OptionSet *global_opt /* reset alarm to -delay seconds after every event */ #ifdef ENABLE_TIMEOUT AlarmWentOff = 0; - signal(SIGALRM, delayAlarmHandler); + signal(SIGALRM, (void (*)(int))delayAlarmHandler); alarm(delay); #endif /* ENABLE_TIMEOUT */ }