D6631: Fix compilation with strict libc (such as musl)
Michael Pyne
noreply at phabricator.kde.org
Tue Jul 11 15:30:19 UTC 2017
mpyne created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
REVISION SUMMARY
Many of the functions we use implicitly are not part of the C standard
library so we have to specific that we're pulling from POSIX, X/Open,
BSD, or whatever standard we're using before we can rely on the
definition being available.
There's plenty of room for refactoring here since I mostly stopped at
just getting the functions being called to show up from their includes,
although I did replace rindex with strrchr since the latter is
standardized, and replaced `uint` with `unsigned` rather than trying to figure out
what header includes those.
TEST PLAN
Now compiles against musl libc
Still compiles against glibc.
REPOSITORY
R111 KSysguard Library
REVISION DETAIL
https://phabricator.kde.org/D6631
AFFECTED FILES
ksysguardd/Command.c
ksysguardd/Linux/ProcessList.c
ksysguardd/Linux/diskstat.c
ksysguardd/Linux/netstat.c
ksysguardd/Linux/softraid.c
ksysguardd/PWUIDCache.c
ksysguardd/conf.c
ksysguardd/ksysguardd.c
To: mpyne, #plasma, #frameworks
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170711/6ea9721c/attachment.html>
More information about the Kde-frameworks-devel
mailing list