statfs vs statvfs checks in kdelibs

Hasso Tepper hasso at
Mon Apr 3 12:46:30 BST 2006

I tried to fix issues with statfs vs. statvfs in kdelibs, but seems that 
by fixing one system only other would broke.

The source of the problem is that some systems like NetBSD broke source 
compatibility with other/older BSD based systems by using struct statvfs 
argument to getmntinfo() instead of struct statfs. What makes detection 
worse - for binary compatibility libc still contains statfs related stuff 
as well.

After some intensive brainstorming session with coworkers we decided that 
compile check for statvfs case is the only sane and simple solution - if 
compile check with struct statvfs argument succeeds, use statvfs, if not, 
use statfs.

Patches for trunk and 3.5 branches attached. Thoughts? *BSD and MacOS 
X/Darwin users, please test and report success/failure.


Hasso Tepper
KDE Estonian Team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-3.5.patch
Type: text/x-diff
Size: 2195 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-trunk.patch
Type: text/x-diff
Size: 3246 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list