bindfs: restore removed patch

This commit is contained in:
i0ntempest
2026-04-23 14:24:29 +10:00
parent 3a98453c6d
commit f86a55e971
2 changed files with 69 additions and 1 deletions
+4 -1
View File
@@ -5,7 +5,7 @@ PortGroup fuse 1.0
name bindfs
version 1.18.4
revision 0
revision 1
categories fuse
license GPL-2+
@@ -23,6 +23,9 @@ checksums rmd160 0204b5630894b86715e72bc2e0ba4250452bedac \
sha256 3266d0aab787a9328bbb0ed561a371e19f1ff077273e6684ca92a90fedb2fe24 \
size 432774
# See https://github.com/mpartel/bindfs/issues/168
patchfiles-append patch-revert-3293dc98e37eed0fb0cbfcbd40434d3c37c69480.patch
configure.cflags-append \
-D_DARWIN_C_SOURCE
if {${os.platform} eq "darwin" && ${os.major} > 22} {
@@ -0,0 +1,65 @@
--- src/bindfs.c
+++ src/bindfs.c
@@ -326,7 +326,7 @@
void *data);
#endif
static int bindfs_statfs(const char *path, struct statvfs *stbuf);
+#if __APPLE__
-#ifdef HAVE_FUSE_T
static int bindfs_statfs_x(const char *path, struct statfs *stbuf);
#endif
static int bindfs_release(const char *path, struct fuse_file_info *fi);
@@ -1528,7 +1528,7 @@
return 0;
}
+#if __APPLE__
-#ifdef HAVE_FUSE_T
static int bindfs_statfs_x(const char *path, struct statfs *stbuf)
{
int res;
@@ -1581,7 +1581,7 @@
understanding from the osxfuse example file:
https://github.com/osxfuse/fuse/blob/master/example/fusexmp_fh.c */
+#ifdef __APPLE__
-#ifdef HAVE_FUSE_T
static int bindfs_setxattr(const char *path, const char *name, const char *value,
size_t size, int flags, uint32_t position)
#else
@@ -1601,7 +1601,7 @@
if (real_path == NULL)
return -errno;
+#if defined(__APPLE__)
-#if HAVE_FUSE_T
if (!strncmp(name, XATTR_APPLE_PREFIX, sizeof(XATTR_APPLE_PREFIX) - 1)) {
flags &= ~(XATTR_NOSECURITY);
}
@@ -1626,7 +1626,7 @@
return 0;
}
+#ifdef __APPLE__
-#ifdef HAVE_FUSE_T
static int bindfs_getxattr(const char *path, const char *name, char *value,
size_t size, uint32_t position)
#else
@@ -1643,7 +1643,7 @@
if (real_path == NULL)
return -errno;
+#if defined(__APPLE__)
-#if HAVE_FUSE_T
if (strcmp(name, A_KAUTH_FILESEC_XATTR) == 0) {
char new_name[MAXPATHLEN];
memcpy(new_name, A_KAUTH_FILESEC_XATTR, sizeof(A_KAUTH_FILESEC_XATTR));
@@ -1785,7 +1785,7 @@
.ioctl = bindfs_ioctl,
#endif
.statfs = bindfs_statfs,
+#ifdef __APPLE__
-#ifdef HAVE_FUSE_T
.statfs_x = bindfs_statfs_x,
#endif
.release = bindfs_release,