GNOME Bugzilla – Bug 141739
Build broken in NetBSD -current (2.0E)
Last modified: 2010-05-12 08:51:24 UTC
gnome-vfs does not build in very recent NetBSD -current (2.0E or so). The problem is that this version has thrown away statfs support in favour of statvfs, that is, build time compatibility with the old function is not kept (to force the conversion of third party software). Most of the code in gnome-vfs works fine, but there is a file that fails during the build because it doesn't honour statvfs properly. Concretely, this file is libgnomevfs/gnome-vfs-unix-mounts.c. If you check it, there are two places where statfs semantics are used, outside any #ifdef's.
Created attachment 27339 [details] [review] Sample patch
They changed getmntinfo to use a statvfs** param instead of a statfs** param ?
Who is 'they'? NetBSD? If so, yes, here is what the manpage for getmntinfo says: SYNOPSIS #include <sys/types.h> #include <sys/statvfs.h> int getmntinfo(struct statvfs **mntbufp, int flags); HISTORY The getmntinfo() function first appeared in 4.4BSD. It was converted from using getfsstat(2) to getvfsstat(2) in NetBSD 3.0. If this affects other systems (haven't been able to find a manpage for getmntinfo in linux), I think the patch should say: #if defined(__NetBSD__) && defined(HAVE_STATVFS) instead of just: #ifdef HAVE_STATVFS so that it's only used under NetBSD.
From bug #141736: « As said, in NetBSD current (post 2.0D), the system has statvfs but not statfs. The problem is that the script stops configuration if statfs is not found, _even if statvfs exists_. It should only stop if both functions are missing, which is what the patch does. » with the mentioned patch being: @@ -262,7 +274,9 @@ statfs(NULL, &st, sizeof (st), 0);],[ AC_MSG_RESULT([4]) AC_DEFINE(STATFS_ARGS, 4, [Number of arguments to statfs()])],[ AC_MSG_RESULT(unknown) - AC_MSG_ERROR([unable to determine number of arguments to statfs()])])]) + if test "x`echo $ac_cv_func_statvfs | $as_tr_sh`" = "xno"; then + AC_MSG_ERROR([unable to determine number of arguments to statfs()])]) + fi]) I'm moving it here since this is related to the problem dealt with in this bug.
Is this still a problem in a recent GNOME version (2.28 or 2.30) which uses gvfs instead of the deprecated gnome-vfs? If this is still an issue for gvfs please file a new bug report against gvfs with good steps to reproduce, or move this existing report to the product gvfs. If this is not an issue anymore in a recent GNOME version, please close this report as RESOLVED OBSOLETE.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!