[BACK]Return to patch-src_bindfs.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / filesystems / fuse-bindfs / patches

File: [cvs.NetBSD.org] / pkgsrc / filesystems / fuse-bindfs / patches / patch-src_bindfs.c (download)

Revision 1.1, Tue Nov 30 12:34:24 2021 UTC (2 years, 3 months ago) by pho
Branch: MAIN
CVS Tags: pkgsrc-2023Q4-base, pkgsrc-2023Q4, pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2, pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, HEAD

Update to bindfs-1.15.1 from 1.8.4

ChangeLog is too long to paste here:
https://bindfs.org/docs/ChangeLog.utf8.txt

Note: On NetBSD, bindfs always maps the root directory "/" regardless
of what source directory specified, unless the -f (foreground) option
is given. The issue existed in 1.8.4 and I thought updating the
package could fix it, but it didn't. The problem was actually in
librefuse, which is now fixed in HEAD:
http://mail-index.netbsd.org/source-changes/2021/11/30/msg134159.html

$NetBSD: patch-src_bindfs.c,v 1.1 2021/11/30 12:34:24 pho Exp $

Fix compatibility with FUSE 2.6: ioctl() is not supported.

--- src/bindfs.c.orig	2021-11-30 11:04:33.969893934 +0000
+++ src/bindfs.c
@@ -1721,8 +1721,8 @@ static struct fuse_operations bindfs_ope
 #if defined(HAVE_FUSE_29) || defined(HAVE_FUSE_3)
     .lock       = bindfs_lock,
     .flock      = bindfs_flock,
-#endif
     .ioctl      = bindfs_ioctl,
+#endif
     .statfs     = bindfs_statfs,
     .release    = bindfs_release,
     .fsync      = bindfs_fsync,
@@ -2843,10 +2843,18 @@ int main(int argc, char *argv[])
     }
 #endif
 
+#if defined(HAVE_FUSE_29) || defined(HAVE_FUSE_3)
     /* Remove the ioctl implementation unless the user has enabled it */
     if (!settings.enable_ioctl) {
         bindfs_oper.ioctl = NULL;
     }
+#else
+    if (settings.enable_ioctl) {
+        fprintf(stderr, "To use --enable-ioctl, bindfs must be "
+                        "compiled with FUSE 2.9.0 or newer.\n");
+        return 1;
+    }
+#endif
 
     /* Remove/Ignore some special -o options */
     args = filter_special_opts(&args);