GNOME Bugzilla – Bug 583927
gvfs-1.2.3: sys/vfs.h not found
Last modified: 2012-01-18 16:16:36 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.
--> build component
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?
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.
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?
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, that's for 1.6.6 now.
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
(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.