summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2008-09-26 18:26:35 +0000
committerMartin Wilke <miwi@FreeBSD.org>2008-09-26 18:26:35 +0000
commit7d7c6fb4c7f89779d2c1e4c04d81b98016855be0 (patch)
tree761a2e07bb0a28fa8e97fa2e066a4aa16993d3a7
parent- Update to 1.5.2.1 (diff)
- Fix build on CURRENT
Submitted by: rnoland@ Approved by: Anish Mistry <amistry@am-productions.biz>
-rw-r--r--sysutils/fusefs-kmod/Makefile2
-rw-r--r--sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h17
-rw-r--r--sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c28
-rw-r--r--sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c17
-rw-r--r--sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vnops.c41
5 files changed, 102 insertions, 3 deletions
diff --git a/sysutils/fusefs-kmod/Makefile b/sysutils/fusefs-kmod/Makefile
index 6c1cc74bcd06..e354d493112c 100644
--- a/sysutils/fusefs-kmod/Makefile
+++ b/sysutils/fusefs-kmod/Makefile
@@ -7,7 +7,7 @@
PORTNAME= fusefs
DISTVERSION= 0.3.9-pre1.20080208
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= sysutils kld
MASTER_SITES= http://mercurial.creo.hu/repos/fuse4bsd-hg/index.cgi/archive/
PKGNAMESUFFIX= -kmod
diff --git a/sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h
new file mode 100644
index 000000000000..4a95133cddc0
--- /dev/null
+++ b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h
@@ -0,0 +1,17 @@
+--- fuse_module/fuse.h.orig 2008-09-26 12:40:20.000000000 -0400
++++ fuse_module/fuse.h 2008-09-26 12:41:54.000000000 -0400
+@@ -49,6 +49,14 @@
+ #endif
+ #endif
+
++#ifndef VOP_GETATTR_TAKES_THREAD
++#if __FreeBSD_version >= 800046
++#define VOP_GETATTR_TAKES_THREAD 0
++#else
++#define VOP_GETATTR_TAKES_THREAD 1
++#endif
++#endif
++
+ #ifndef USE_PRIVILEGE_API
+ /*
+ * __FreeBSD_version bump was omitted for introduction of
diff --git a/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c
new file mode 100644
index 000000000000..2b03b0d410cb
--- /dev/null
+++ b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c
@@ -0,0 +1,28 @@
+--- fuse_module/fuse_io.c.orig 2008-02-05 00:25:57.000000000 -0500
++++ fuse_module/fuse_io.c 2008-09-26 13:15:56.000000000 -0400
+@@ -157,7 +157,11 @@
+ goto out;
+
+ if (uio->uio_rw == UIO_WRITE && fp->f_flag & O_APPEND) {
+- if ((err = VOP_GETATTR(vp, &va, cred, td)))
++ if ((err = VOP_GETATTR(vp, &va, cred
++#if VOP_GETATTR_TAKES_THREAD
++ , td
++#endif
++ )))
+ goto out;
+ uio->uio_offset = va.va_size;
+ } else if ((flags & FOF_OFFSET) == 0)
+@@ -823,7 +827,11 @@
+ #if FUSELIB_CONFORM_BIOREAD
+ struct vattr va;
+
+- if ((err = VOP_GETATTR(vp, &va, cred, curthread)))
++ if ((err = VOP_GETATTR(vp, &va, cred
++#if VOP_GETATTR_TAKES_THREAD
++ , curthread
++#endif
++ )))
+ goto out;
+ #endif
+
diff --git a/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c
index bc09bafda94c..783cde9cd354 100644
--- a/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c
+++ b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c
@@ -1,5 +1,5 @@
---- fuse_module/fuse_vfsops.c.orig 2008-04-11 11:34:04.000000000 +0900
-+++ fuse_module/fuse_vfsops.c 2008-04-11 11:34:24.000000000 +0900
+--- fuse_module/fuse_vfsops.c.orig 2008-02-05 00:25:57.000000000 -0500
++++ fuse_module/fuse_vfsops.c 2008-09-26 12:53:33.000000000 -0400
@@ -18,6 +18,7 @@
#include <sys/namei.h>
#include <sys/mount.h>
@@ -8,3 +8,16 @@
#include "fuse.h"
#include "fuse_session.h"
+@@ -667,7 +668,11 @@
+ if (vp->v_type == VNON) {
+ struct vattr va;
+
+- (void)VOP_GETATTR(vp, &va, td->td_ucred, td);
++ (void)VOP_GETATTR(vp, &va, td->td_ucred
++#if VOP_GETATTR_TAKES_THREAD
++ , td
++#endif
++ );
+ }
+ *vpp = vp;
+ #if _DEBUG2G
diff --git a/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vnops.c b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vnops.c
new file mode 100644
index 000000000000..74ac7dd22c20
--- /dev/null
+++ b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vnops.c
@@ -0,0 +1,41 @@
+--- fuse_module/fuse_vnops.c.orig 2008-09-26 13:08:03.000000000 -0400
++++ fuse_module/fuse_vnops.c 2008-09-26 13:14:36.000000000 -0400
+@@ -799,8 +799,11 @@
+ struct vnode *vp = ap->a_vp;
+ struct vattr *vap = ap->a_vap;
+ struct ucred *cred = ap->a_cred;
++#if VOP_GETATTR_TAKES_THREAD
+ struct thread *td = ap->a_td;
+-
++#else
++ struct thread *td = curthread;
++#endif
+ struct fuse_dispatcher fdi;
+ struct timespec uptsp;
+ int err = 0;
+@@ -946,7 +949,11 @@
+ /* We are to do the check in-kernel */
+
+ if (! (facp->facc_flags & FACCESS_VA_VALID)) {
+- err = VOP_GETATTR(vp, VTOVA(vp), cred, td);
++ err = VOP_GETATTR(vp, VTOVA(vp), cred
++#if VOP_GETATTR_TAKES_THREAD
++ , td
++#endif
++ );
+ if (err)
+ return (err);
+ facp->facc_flags |= FACCESS_VA_VALID;
+@@ -3005,8 +3012,11 @@
+ struct vattr *vap = ap->a_vap;
+ struct vnode *vp = ap->a_vp;
+ struct ucred *cred = ap->a_cred;
++#if VOP_GETATTR_TAKES_THREAD
+ struct thread *td = ap->a_td;
+-
++#else
++ struct thread *td = curthread;
++#endif
+ int err = 0;
+ struct fuse_dispatcher fdi;
+ struct fuse_setattr_in *fsai;