Bug 365923

Summary: Solid udisks2 backend fails to compile on musl libc: dev_t requires sys/types.h
Product: [Frameworks and Libraries] frameworks-solid Reporter: A. Wilcox (awilfox) <awilfox>
Component: generalAssignee: Lukáš Tinkl <lukas>
Status: RESOLVED FIXED    
Severity: major CC: kdelibs-bugs
Priority: NOR    
Version: 5.24.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 5.37.0
Attachments: Add #include <sys/types.h> to udisksblock.h

Description A. Wilcox (awilfox) 2016-07-21 07:48:13 UTC
The udisks2 backend of the Solid framework does not #include <sys/types.h>, which causes a compile-time error on the musl libc where dev_t is not defined in other headers.

A patch is included that has solved this issue for us at Adélie Linux.

Reproducible: Always

Steps to Reproduce:
1. Use musl libc.
2. Attempt to build Solid.

Actual Results:  
In file included from /usr/src/kde-frameworks/solid-5.21.0/work/solid-5.21.0/src/solid/devices/backends/udisks2/udisksdevice.cpp:24:0:
/usr/src/kde-frameworks/solid-5.21.0/work/solid-5.21.0/src/solid/devices/backends/udisks2/udisksblock.h:48:5: error: ‘dev_t’ does not name a type
     dev_t m_devNum;
     ^

Expected Results:  
A successful build.
Comment 1 A. Wilcox (awilfox) 2016-07-21 07:48:48 UTC
Created attachment 100224 [details]
Add #include <sys/types.h> to udisksblock.h