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
Index: kdecore/kmountpoint.cpp
===================================================================
--- kdecore/kmountpoint.cpp	(revision 524782)
+++ kdecore/kmountpoint.cpp	(working copy)
@@ -222,10 +222,10 @@
 
 #ifdef HAVE_GETMNTINFO
 
-#if defined(HAVE_STRUCT_STATVFS)
+#if defined(HAVE_STRUCT_STATFS)
+    struct statfs *mounted;
+#elif defined(HAVE_STRUCT_STATVFS)
     struct statvfs *mounted;
-#elif defined(HAVE_STRUCT_STATFS)
-    struct statfs *mounted;
 #endif
 
     int num_fs = getmntinfo(&mounted, MNT_NOWAIT);
Index: kio/kio/global.cpp
===================================================================
--- kio/kio/global.cpp	(revision 524782)
+++ kio/kio/global.cpp	(working copy)
@@ -1405,10 +1405,10 @@
 
 #ifdef HAVE_GETMNTINFO
 
-#if defined(HAVE_STRUCT_STATVFS)
+#if defined(HAVE_STRUCT_STATFS)
+    struct statfs *mounted;
+#elif defined(HAVE_STRUCT_STATVFS)
     struct statvfs *mounted;
-#elif defined(HAVE_STRUCT_STATFS)
-    struct statfs *mounted;
 #endif
 
     int num_fs = getmntinfo(&mounted, MNT_NOWAIT);
@@ -1675,10 +1675,10 @@
 
 #ifdef HAVE_GETMNTINFO
 
-#if defined(HAVE_STRUCT_STATVFS)
+#if defined(HAVE_STRUCT_STATFS)
+    struct statfs *mounted;
+#elif defined(HAVE_STRUCT_STATVFS)
     struct statvfs *mounted;
-#elif defined(HAVE_STRUCT_STATFS)
-    struct statfs *mounted;
 #endif
     char    realpath_buffer[MAXPATHLEN];
 
_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem

Reply via email to