After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 583927 - gvfs-1.2.3: sys/vfs.h not found
gvfs-1.2.3: sys/vfs.h not found
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: build
1.6.x
Other NetBSD
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2009-05-26 19:20 UTC by Thomas Klausner
Modified: 2012-01-18 16:16 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Thomas Klausner 2009-05-26 19:20:28 UTC
client/gvfsfusedaemon.c unconditionally includes sys/vfs.h which
doesn't exist at least on NetBSD.
A configure check should test for it and include it only if it exists.

On NetBSD, compilation succeeds without it, so please test if it is needed at
all.
Comment 1 Christian Kellner 2011-05-07 13:51:03 UTC
--> build component
Comment 2 Kjartan Maraas 2011-05-23 20:09:42 UTC
From /usr/include/sys/vfs.h on linux (glibc-headers):

/* Other systems declare `struct statfs' et al in <sys/vfs.h>,
   so we have this file to be compatible with programs expecting it.  */

#include <sys/statfs.h>

So it seems we would be better off just including <sys/statfs.h> instead?
Comment 3 Thomas Klausner 2011-05-24 10:27:56 UTC
sys/statfs.h did exist on older NetBSD releases, but recent releases use sys/statvfs.h instead (like Solaris does). So even with this fix, a conditional would be needed.
Comment 4 Tomas Bzatek 2011-08-29 14:28:07 UTC
I think we don't need any of sys/vfs.h or sys/statfs.h - simply there's no such POSIX call in the sources as of today.

Proposing removal of the whole line - Thomas, can you please try removing it and confirm it compiles and works fine on your systems?
Comment 5 Thomas Klausner 2012-01-11 20:42:54 UTC
Tomas: Yes, removing the sys/vfs.h include in client/gvfsfusedaemon.c makes this file compile on NetBSD (except for an unrelated problem, missing definition of FUSE_CAP_ATOMIC_O_TRUNC, which should come from fuse headers).
So in my eyes, please just remove the line.
Comment 6 Thomas Klausner 2012-01-11 20:43:33 UTC
Oh, that's for 1.6.6 now.
Comment 7 Tomas Bzatek 2012-01-18 16:08:39 UTC
Looking at fuse/fuse.h include, both sys/stat.h and sys/statvfs.h are pulled in at least on linux (but the headers look to be the same for all platforms). We don't really need sys/vfs.h or sys/statfs.h, just the sys/statvfs.h which I'd leave as fuse responsibility.

So I'm removing this include:

commit 1a82463d564533ae06964326e0b435e6181fcca5
Author: Tomas Bzatek <tbzatek@redhat.com>
Date:   Wed Jan 18 17:06:30 2012 +0100

    fuse: Remove the unused sys/vfs.h include
    
    https://bugzilla.gnome.org/show_bug.cgi?id=583927
Comment 8 Tomas Bzatek 2012-01-18 16:16:36 UTC
(In reply to comment #5)
> Tomas: Yes, removing the sys/vfs.h include in client/gvfsfusedaemon.c makes
> this file compile on NetBSD (except for an unrelated problem, missing
> definition of FUSE_CAP_ATOMIC_O_TRUNC, which should come from fuse headers).
> So in my eyes, please just remove the line.

Oh btw. the FUSE_CAP_ATOMIC_O_TRUNC flag has been added within the 84f66425ea74f2657f83d00347acf7fc0a638f99 commit and later the fuse package dependency was bumped to 2.8.0 as a commit f6b792cbbfdde70d201b3609d2eb67fd82fcccf2.

Please let me know if the NetBSD situation doesn't fit these constrains.