<table><tr><td style="">mpyne created this revision.<br />Restricted Application added a project: Frameworks.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D6597" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The KIO KPAC DHCP helper uses <tt style="background: #ebebeb; font-size: 13px;">setgroups(2)</tt>. But this is apparently not specified in POSIX due to being a "privileged call", so it is only available as an extension, typically needing <tt style="background: #ebebeb; font-size: 13px;">_BSD_SOURCE</tt> to be explicitly defined from what I can gather.</p>
<p>glibc will gladly provide <tt style="background: #ebebeb; font-size: 13px;">setgroups()</tt> as a GNU extension without requiring <tt style="background: #ebebeb; font-size: 13px;">_BSD_SOURCE</tt>, but musl libc requires one of <tt style="background: #ebebeb; font-size: 13px;">_{BSD_GNU}_SOURCE</tt> and doesn't pre-define either.</p>
<p>Defining <tt style="background: #ebebeb; font-size: 13px;">_BSD_SOURCE</tt> is easy enough but it seems that glibc now complains about that, calling it deprecated, so I also threw in a <tt style="background: #ebebeb; font-size: 13px;">_DEFAULT_SOURCE</tt> define, which appears to be the new hotness. But maybe it would be easier to find a way to avoid <tt style="background: #ebebeb; font-size: 13px;">setgroups()</tt>?</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>KIO now builds under musl libc<br />
KIO still builds under glibc</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6597" rel="noreferrer">https://phabricator.kde.org/D6597</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/kpac/kpac_dhcp_helper.c</div></div></div><br /><div><strong>To: </strong>mpyne, Frameworks<br /></div>