The proxy autoconfiguration portion of KIO fails to build against the musl libc due to _BSD_SOURCE and _GNU_SOURCE both being undefined. This causes the symbol 'setgroups' to be hidden as it is not specified in POSIX.1-2008. It also causes NI_MAXHOST and IFF_LOOPBACK to be undefined. I suggest adding a check for setgroups to ConfigureChecks.cmake in the kpac/ directory and defining _BSD_SOURCE if it is not available, but that is just a suggestion. I am not sure the desired style in the KIO project. Reproducible: Always Steps to Reproduce: 1. Use musl libc. 2. Attempt to build KIO's proxy autoconfiguration support. Actual Results: /usr/src/kde-frameworks/kio-5.21.0/work/kio-5.21.0/src/kpac/kpac_dhcp_helper.c: In function ‘set_gid’: /usr/src/kde-frameworks/kio-5.21.0/work/kio-5.21.0/src/kpac/kpac_dhcp_helper.c:59:9: error: implicit declaration of function ‘setgroups’ [-Werror=implicit-function-declaration] if (setgroups(1, &gid) == -1) { ^ /usr/src/kde-frameworks/kio-5.21.0/work/kio-5.21.0/src/kpac/kpac_dhcp_helper.c: In function ‘send_request’: /usr/src/kde-frameworks/kio-5.21.0/work/kio-5.21.0/src/kpac/kpac_dhcp_helper.c:173:19: error: ‘NI_MAXHOST’ undeclared (first use in this function) char hostname[NI_MAXHOST]; ^ /usr/src/kde-frameworks/kio-5.21.0/work/kio-5.21.0/src/kpac/kpac_dhcp_helper.c:173:19: note: each undeclared identifier is reported only once for each function it appears in /usr/src/kde-frameworks/kio-5.21.0/work/kio-5.21.0/src/kpac/kpac_dhcp_helper.c:186:30: error: ‘IFF_LOOPBACK’ undeclared (first use in this function) if (ifa->ifa_flags & IFF_LOOPBACK) { ^ Expected Results: Successful build.
Is this still an issue with KDE Frameworks 5.49?
Fixed in https://cgit.kde.org/kio.git/commit/src/kpac?id=15451d505fdbc37b5d027f8ad1ba6aeb6314cc2d