Compilation fails with MUSL: worker.c:2:10: fatal error: execinfo.h: No such file or directory
FAILED: subprojects/libinsane/src/libinsane.so.1.0.9.p/workarounds_dedicated_process_worker.c.o
x86_64-gentoo-linux-musl-gcc -Isubprojects/libinsane/src/libinsane.so.1.0.9.p -Isubprojects/libinsane/src -I../libinsane-1.0.9/subprojects/libinsane/src -Isubprojects/libinsane/include -I../libinsane-1.0.9/subprojects/libinsane/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DOS_LINUX -DCOMPILER_GCC -O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -fPIC -pthread -MD -MQ subprojects/libinsane/src/libinsane.so.1.0.9.p/workarounds_dedicated_process_worker.c.o -MF subprojects/libinsane/src/libinsane.so.1.0.9.p/workarounds_dedicated_process_worker.c.o.d -o subprojects/libinsane/src/libinsane.so.1.0.9.p/workarounds_dedicated_process_worker.c.o -c ../libinsane-1.0.9/subprojects/libinsane/src/workarounds/dedicated_process/worker.c
../libinsane-1.0.9/subprojects/libinsane/src/workarounds/dedicated_process/worker.c:2:10: fatal error: execinfo.h: No such file or directory
2 | #include <execinfo.h>
| ^~~~~~~~~~~~
compilation terminated.
execinfo.h is a GNU specific header, so compilation with another libc will fail on backtrace code.
Checking worker.c most of the crash handler can still work without GLIBC, an easy fix here is to wrap execinfo.h include and backtrace*() calls in "#ifdef GLIBC" (I can send a MR if that fix is fine - just need to setup GNOME gitlab keys)
Downstream bug: https://bugs.gentoo.org/832146