https://bugs.kde.org/show_bug.cgi?id=365925
Bug ID: 365925 Summary: KIO KPAC fails to build on musl libc: _BSD_SOURCE or _GNU_SOURCE needs to be defined Product: frameworks-kio Version: 5.24.0 Platform: Compiled Sources OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: fa...@kde.org Reporter: awil...@adelielinux.org CC: kdelibs-b...@kde.org 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. -- You are receiving this mail because: You are watching all bug changes.