Fix dev_t declaration for Solid UDisks2 backend
ClosedPublic

Authored by mpyne on Jul 9 2017, 11:37 PM.

Details

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

Diff Detail

Repository
R245 Solid
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mpyne created this revision.Jul 9 2017, 11:37 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJul 9 2017, 11:37 PM
mpyne added a comment.Jul 22 2017, 8:44 PM

If there are objections to this please let me know in next few days. A similar Differential request to this has already been opened and abandoned.

I also have similar fixes/changes in D6597 and D6598 for which I won't also add spam.

Note that this type of fix for KSysguard did cause build errors on FreeBSD in the CI, but it's hard for me to predict in advance the unique ways in which OSes will conspire to make this difficult. But I will address any such build issues if they pop up.

davidedmundson accepted this revision.Jul 23 2017, 8:28 AM
This revision is now accepted and ready to land.Jul 23 2017, 8:28 AM
This revision was automatically updated to reflect the committed changes.