how to check for a struct in multiple headers?

Hasso Tepper hasso at kde.org
Fri Mar 31 11:17:57 CEST 2006


Tanner Lovelace wrote:
> Actually, not even that will work due to how the code is written.
> kmountpoint.cpp has this:
>	
> #if defined(HAVE_STRUCT_STATVFS)
>     struct statvfs *mounted;
> #elif defined(HAVE_STRUCT_STATFS)
>     struct statfs *mounted;
> #endif
>
> So, even if it finds HAVE_STRUCT_STATFS it won't be
> used because HAVE_STRUCT_STATVFS was found first
> and it assumes it will use it, which isn't the case in OS X.
> I just verified that by fixing the test for HAVE_STRUCT_STATFS
> and still having the compile fail. :-(
>
> My guess is we need a test about what type of parameter
> getmntinfo takes.  Suggestions?

After investigation I think that just switching should do the job - ie. 
try to use statfs at first. Can you try the attached patch with your 
improved test if it fixes the problem for you?


regards,

-- 
Hasso Tepper
KDE Estonian Team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-getmntinfo.patch
Type: text/x-diff
Size: 1369 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20060331/baf6d76f/attachment.bin 


More information about the Kde-buildsystem mailing list