GNOME Bugzilla – Bug 655027
struct statvfs has no members f_mntonname f_mntfromname f_fstypename
Last modified: 2011-08-12 11:44:47 UTC
Created attachment 192359 [details] complete build log from MacPorts glib 2.29.12 fails to build on Mac OS X 10.6.8 with Xcode 3.2.6 with the following error: gunixmounts.c: In function '_g_get_unix_mounts': gunixmounts.c:601: warning: passing argument 1 of 'getmntinfo' from incompatible pointer type gunixmounts.c:610: error: 'struct statvfs' has no member named 'f_mntonname' gunixmounts.c:611: error: 'struct statvfs' has no member named 'f_mntfromname' gunixmounts.c:612: error: 'struct statvfs' has no member named 'f_fstypename' glib 2.29.10 built fine on this system. I see a number of hits on Google for this error message; perhaps one is relevant: http://www.google.com/search?q=%22%27struct+statvfs%27+has+no+member+named+%27f_mntonname%27%22
I think it is time to split up gunixmounts.c into pieces that can be understood individually. I can't find my way in that source file anymore. glinuxmounts.c vs gsolarismounts.c, maybe ?
I'm confused (as usual, I suppose). It compiles fine on Fedora 14, but those symbols aren't found anywhere in /usr/include. Where do they come from? Bracketing the 3 lines with @ifndef HAVE_CARBON...#endif lets it build, but that's probably not the right solution long-term. Mattias: Yes, it would seem most portable to have a gposixmounts.c which is the default and gfoomounts.c for cases like linux where there's an advantage to specializing.
I don't think we're going to get this fixed without someone active who can build on OS X and test patches. Ryan, can you do that? Patrick, any ideas?
I'm active, I have commit privs, and I can build and test on all supported OSX builds, from Tiger through Lion.
Does the commit from bug 656048 help the OS X build?
Unfortunately, no, and neither does passing ac_cv_func_statvfs=no to configure.
*** This bug has been marked as a duplicate of bug 617949 ***
I agree with the sentiment of comment 1. When solving bug 617949 I had to write #ifdef HAVE_MNTENT_H #elif defined (HAVE_SYS_MNTTAB_H) #elif defined(HAVE_SYS_MNTCTL_H) && defined(HAVE_SYS_VMOUNT_H) && defined(HAVE_SYS_VFS_H) #elif defined(HAVE_GETMNTINFO) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H) #elif defined(__INTERIX) #else #error No _g_get_unix_mounts() implementation for system #endif on a sheet of paper to keep track! Sorry I missed Comment 3 - should I set up my bugzilla account in some way to be emailed such things? (I saw 617949 was reopened because I was still on the cc: )