aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/fusefs-kmod/Makefile6
-rw-r--r--sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c111
2 files changed, 109 insertions, 8 deletions
diff --git a/sysutils/fusefs-kmod/Makefile b/sysutils/fusefs-kmod/Makefile
index 9bf3f82078a0..4f8da0de223b 100644
--- a/sysutils/fusefs-kmod/Makefile
+++ b/sysutils/fusefs-kmod/Makefile
@@ -7,7 +7,7 @@
PORTNAME= fusefs
DISTVERSION= 0.3.9-pre1.20080208
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= sysutils kld
MASTER_SITES= http://mercurial.creo.hu/repos/fuse4bsd-hg/index.cgi/archive/
PKGNAMESUFFIX= -kmod
@@ -58,10 +58,6 @@ OPTIONS= AUTOSETUP "Automatic global config file setup" off
.include <bsd.port.pre.mk>
-.if (${OSVERSION} >= 800000)
-BROKEN= does not build on 8.x
-.endif
-
.if !exists(${SRC_BASE}/sys/Makefile)
IGNORE= requires the Kernel source to be installed. Set SRC_BASE if it is not in /usr/src
.endif
diff --git a/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c
index 2b03b0d410cb..25f17a535124 100644
--- a/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c
+++ b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c
@@ -1,6 +1,17 @@
--- 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 @@
++++ fuse_module/fuse_io.c 2009-07-13 09:31:24.000000000 -0400
+@@ -35,6 +35,10 @@
+ #include <vm/vnode_pager.h>
+ #include <vm/vm_object.h>
+
++#if (__FreeBSD__ >= 8)
++#define vfs_bio_set_validclean vfs_bio_set_valid
++#endif
++
+ #include "fuse.h"
+ #include "fuse_session.h"
+ #include "fuse_vnode.h"
+@@ -157,7 +161,11 @@
goto out;
if (uio->uio_rw == UIO_WRITE && fp->f_flag & O_APPEND) {
@@ -13,7 +24,72 @@
goto out;
uio->uio_offset = va.va_size;
} else if ((flags & FOF_OFFSET) == 0)
-@@ -823,7 +827,11 @@
+@@ -227,7 +235,7 @@
+ return (0);
+
+ biosize = vp->v_mount->mnt_stat.f_iosize;
+- bcount = min(MAXBSIZE, biosize);
++ bcount = MIN(MAXBSIZE, biosize);
+
+ DEBUG2G("entering loop\n");
+ do {
+@@ -352,7 +360,7 @@
+ fri = fdi.indata;
+ fri->fh = fufh->fh_id;
+ fri->offset = uio->uio_offset;
+- fri->size = min(uio->uio_resid,
++ fri->size = MIN(uio->uio_resid,
+ fusefs_get_data(vp->v_mount)->max_read);
+
+ DEBUG2G("fri->fh %llu, fri->offset %d, fri->size %d\n",
+@@ -399,7 +407,7 @@
+ while (uio->uio_resid > 0) {
+ int transfersize;
+
+- chunksize = min(iov->iov_len, nmax);
++ chunksize = MIN(iov->iov_len, nmax);
+
+ if (uio->uio_rw == UIO_READ) {
+ struct fuse_read_in *fri;
+@@ -464,7 +472,7 @@
+ {
+ int err;
+
+- if ((err = uiomove(buf, min(reqsize, bufsize), uio)))
++ if ((err = uiomove(buf, MIN(reqsize, bufsize), uio)))
+ return (err);
+
+ if (bufsize < reqsize)
+@@ -502,7 +510,7 @@
+ }
+
+ while (uio->uio_resid > 0) {
+- chunksize = min(uio->uio_resid,
++ chunksize = MIN(uio->uio_resid,
+ fusefs_get_data(vp->v_mount)->max_write);
+
+ fdi.iosize = sizeof(*fwi) + chunksize;
+@@ -569,7 +577,7 @@
+ do {
+ lbn = uio->uio_offset / biosize;
+ on = uio->uio_offset & (biosize-1);
+- n = min((unsigned)(biosize - on), uio->uio_resid);
++ n = MIN((unsigned)(biosize - on), uio->uio_resid);
+
+ DEBUG2G("lbn %d, on %d, n %d, uio offset %d, uio resid %d\n",
+ (int)lbn, on, n, (int)uio->uio_offset, uio->uio_resid);
+@@ -739,8 +747,8 @@
+ */
+ if (n) {
+ if (bp->b_dirtyend > 0) {
+- bp->b_dirtyoff = min(on, bp->b_dirtyoff);
+- bp->b_dirtyend = max((on + n), bp->b_dirtyend);
++ bp->b_dirtyoff = MIN(on, bp->b_dirtyoff);
++ bp->b_dirtyend = MAX((on + n), bp->b_dirtyend);
+ } else {
+ bp->b_dirtyoff = on;
+ bp->b_dirtyend = on + n;
+@@ -823,7 +831,11 @@
#if FUSELIB_CONFORM_BIOREAD
struct vattr va;
@@ -26,3 +102,32 @@
goto out;
#endif
+@@ -831,7 +843,7 @@
+ bp->b_resid = bp->b_bcount;
+ while (bp->b_resid > 0) {
+ DEBUG2G("starting bio with resid %ld\n", bp->b_resid);
+- chunksize = min(bp->b_resid,
++ chunksize = MIN(bp->b_resid,
+ fusefs_get_data(vp->v_mount)->max_read);
+ fdi.iosize = sizeof(*fri);
+ if (! op)
+@@ -842,8 +854,8 @@
+ fri->fh = fufh->fh_id;
+ fri->offset = ((off_t)bp->b_blkno) * biosize + ioff;
+ #if FUSELIB_CONFORM_BIOREAD
+- chunksize = min(chunksize,
+- min(fri->offset + bp->b_resid,
++ chunksize = MIN(chunksize,
++ MIN(fri->offset + bp->b_resid,
+ va.va_size) - fri->offset);
+ if (chunksize == 0) {
+ respsize = -1;
+@@ -901,7 +913,7 @@
+
+ bufdat = bp->b_data + bp->b_dirtyoff;
+ while (bp->b_dirtyend > bp->b_dirtyoff) {
+- chunksize = min(bp->b_dirtyend - bp->b_dirtyoff,
++ chunksize = MIN(bp->b_dirtyend - bp->b_dirtyoff,
+ fusefs_get_data(vp->v_mount)->max_write);
+
+ fdi.iosize = sizeof(*fwi);