D6596: Fix dev_t declaration for Solid UDisks2 backend
Michael Pyne
noreply at phabricator.kde.org
Sun Jul 9 23:37:35 UTC 2017
mpyne created this revision.
Restricted Application added a project: Frameworks.
REVISION SUMMARY
Compiling Solid on a musl-based Linux environment (long story...) gives an error compiling UDisks2 support because it can't find the `dev_t` type.
Looking up `dev_t`, it appears that POSIX requires the `<sys/types.h>` header instead of wherever we're currently finding this from (implicitly?). We already have a `sys/types.h` include, but we only currently use it for FreeBSD.
Since we're already guarding UDisks2 to Linux-based systems or FreeBSD, I opted just to remove the include guard. This fixes the compile on musl libc and doesn't break compilation on glibc. I'm not aware of any other major C libraries for Linux environments to test against.
TEST PLAN
Builds on glibc
Builds on musl libc
REPOSITORY
R245 Solid
REVISION DETAIL
https://phabricator.kde.org/D6596
AFFECTED FILES
src/solid/devices/backends/udisks2/udisksblock.h
To: mpyne, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170709/d5d3699e/attachment.html>
More information about the Kde-frameworks-devel
mailing list