aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2012-07-06 10:45:26 +0800
committerhrs <hrs@FreeBSD.org>2012-07-06 10:45:26 +0800
commit45e238911a1539efaa315ed54f89aa2a38696439 (patch)
tree829f438c7695155ce85e550e04dd48b359d26518 /net
parent47f2c055c11b132c32e19ed8d24c0d140f7b4aec (diff)
downloadfreebsd-ports-gnome-45e238911a1539efaa315ed54f89aa2a38696439.tar.gz
freebsd-ports-gnome-45e238911a1539efaa315ed54f89aa2a38696439.tar.zst
freebsd-ports-gnome-45e238911a1539efaa315ed54f89aa2a38696439.zip
- Update to 1.6.1.
- Mark MAKE_JOBS_SAFE=yes. - Use OPTIONSng. Submitted by: bjk (maintainer)
Diffstat (limited to 'net')
-rw-r--r--net/openafs/Makefile15
-rw-r--r--net/openafs/Makefile.man3
-rw-r--r--net/openafs/distinfo8
-rw-r--r--net/openafs/files/patch-Makefile.in28
-rw-r--r--net/openafs/files/patch-configure.ac22
-rw-r--r--net/openafs/files/patch-src__afs__FBSD__osi_groups.c22
-rw-r--r--net/openafs/files/patch-src__afs__FBSD__osi_vnodeops.c51
-rw-r--r--net/openafs/files/patch-src__afs__afs_pioctl.c16
-rw-r--r--net/openafs/files/patch-src__afs__afs_prototypes.h16
-rw-r--r--net/openafs/files/patch-src__afs__afs_server.c64
-rw-r--r--net/openafs/files/patch-src__aklog__aklog.c20
-rw-r--r--net/openafs/files/patch-src__budb__Makefile.in16
-rw-r--r--net/openafs/files/patch-src__config__afs_sysnames.h28
-rw-r--r--net/openafs/files/patch-src__config__param.amd64_fbsd_100.h221
-rw-r--r--net/openafs/files/patch-src__config__param.amd64_fbsd_83.h218
-rw-r--r--net/openafs/files/patch-src__config__param.amd64_fbsd_84.h221
-rw-r--r--net/openafs/files/patch-src__config__param.amd64_fbsd_91.h218
-rw-r--r--net/openafs/files/patch-src__config__param.i386_fbsd_100.h219
-rw-r--r--net/openafs/files/patch-src__config__param.i386_fbsd_83.h216
-rw-r--r--net/openafs/files/patch-src__config__param.i386_fbsd_84.h219
-rw-r--r--net/openafs/files/patch-src__config__param.i386_fbsd_91.h216
-rw-r--r--net/openafs/files/patch-src__libafs__Makefile.common.in11
-rw-r--r--net/openafs/files/patch-src__libafs__MakefileProto.FBSD.in21
-rw-r--r--net/openafs/files/patch-src__libuafs__MakefileProto.FBSD.in14
-rw-r--r--net/openafs/files/patch-src__rx__FBSD__rx_knet.c16
-rw-r--r--net/openafs/files/patch-src__tbudb__Makefile.in14
-rw-r--r--net/openafs/files/patch-src__volser__Makefile.in31
-rw-r--r--net/openafs/pkg-plist3
28 files changed, 1969 insertions, 198 deletions
diff --git a/net/openafs/Makefile b/net/openafs/Makefile
index 8658ab98fd41..bcb649706283 100644
--- a/net/openafs/Makefile
+++ b/net/openafs/Makefile
@@ -8,7 +8,6 @@
PORTNAME= openafs
DISTVERSION= ${AFS_DISTVERSION}.${DBVERSION:S/-//g}
-PORTREVISION= 3
CATEGORIES= net kld
MASTER_SITES= http://dl.central.org/dl/openafs/${AFS_DISTVERSION}/:openafs \
http://dl.openafs.org/dl/openafs/${AFS_DISTVERSION}/:openafs \
@@ -28,17 +27,17 @@ LICENSE_NAME= IBM Public License Version 1.0
LICENSE_FILE= ${WRKSRC}/doc/LICENSE
LICENSE_PERMS= auto-accept
-AFS_DISTVERSION= 1.6.0
+AFS_DISTVERSION= 1.6.1
DBVERSION= 2011-08-14
-OPTIONS= FUSE "Build afsd.fuse (enable fuse support)" off
+OPTIONS_DEFINE= FUSE
USE_LDCONFIG= yes
PATCH_STRIP= -p1
USE_BZIP2= yes
HAS_CONFIGURE= yes
USE_RC_SUBR= afsd afsserver
-MAKE_JOBS_UNSAFE= yes
+MAKE_JOBS_SAFE= yes
ONLY_FOR_ARCHS= i386 amd64
@@ -80,12 +79,12 @@ CONFIGURE_ARGS= --prefix=${PREFIX} \
--includedir=${PREFIX}/include/openafs \
${CONFIGURE_TARGET}
-.if !defined(WITH_FUSE)
-CONFIGURE_ARGS+= --disable-fuse-client
-PLIST_SUB+= FUSE="@comment "
-.else
+.if ${PORT_OPTIONS:MFUSE}
LIB_DEPENDS+= fuse.2:${PORTSDIR}/sysutils/fusefs-libs
PLIST_SUB+= FUSE=""
+.else
+CONFIGURE_ARGS+= --disable-fuse-client
+PLIST_SUB+= FUSE="@comment "
.endif
WRKSRC= ${WRKDIR}/${PORTNAME}-${AFS_DISTVERSION}
diff --git a/net/openafs/Makefile.man b/net/openafs/Makefile.man
index aa3ba063083f..f1ca9afaa4ec 100644
--- a/net/openafs/Makefile.man
+++ b/net/openafs/Makefile.man
@@ -188,9 +188,10 @@ MAN5+= uss.5
MAN5+= uss_bulk.5
MAN5+= vldb.DB0.5
MAN8+= afsd.8
-.if defined(WITH_FUSE)
+.if ${PORT_OPTIONS:MFUSE}
MLINKS+= afsd.8 afsd.fuse.8
.endif
+MAN8+= aklog_dynamic_auth.8
MAN8+= asetkey.8
MAN8+= backup.8
MAN8+= backup_adddump.8
diff --git a/net/openafs/distinfo b/net/openafs/distinfo
index 3c04fc4a5696..fff1b8832aa3 100644
--- a/net/openafs/distinfo
+++ b/net/openafs/distinfo
@@ -1,6 +1,6 @@
-SHA256 (openafs-1.6.0-src.tar.bz2) = e722a3b817655fe9b4e0d6e2c31ab1eb3d74947f51267311c85c43302e0644e6
-SIZE (openafs-1.6.0-src.tar.bz2) = 14308072
-SHA256 (openafs-1.6.0-doc.tar.bz2) = 326bcae377c74bfed5b09b5a52c3d18a317e42c30c3d76726c91b253d65b0659
-SIZE (openafs-1.6.0-doc.tar.bz2) = 3477311
+SHA256 (openafs-1.6.1-src.tar.bz2) = d05ef7f8e89b6939726d93bb46d4353e20a459890b9c3ca3065d50de408bf5b0
+SIZE (openafs-1.6.1-src.tar.bz2) = 14356434
+SHA256 (openafs-1.6.1-doc.tar.bz2) = c41006ca12368b028f2108c972bd3de1881b5f78941bc831ff238a0344a3bec6
+SIZE (openafs-1.6.1-doc.tar.bz2) = 3481865
SHA256 (CellServDB.2011-08-14) = fa547873edda44682440d66b79d2002f7019fac520eb3a6d6d2c7e9e83ad8d89
SIZE (CellServDB.2011-08-14) = 36836
diff --git a/net/openafs/files/patch-Makefile.in b/net/openafs/files/patch-Makefile.in
new file mode 100644
index 000000000000..9f09e70d3f6b
--- /dev/null
+++ b/net/openafs/files/patch-Makefile.in
@@ -0,0 +1,28 @@
+--- openafs-1.6.1/Makefile.in.orig 2012-03-27 08:03:34.000000000 +0900
++++ openafs-1.6.1/Makefile.in 2012-06-24 06:37:47.000000000 +0900
+@@ -338,6 +338,7 @@
+
+ venus: cmd comerr volser ptserver libafscp
+ +${COMPILE_PART1} venus ${COMPILE_PART2}
++venus-test:: venus
+ +${COMPILE_PART1} venus/test ${COMPILE_PART2}
+
+ afsd: cmd comerr sys kauth @CLIENT_UAFS_DEP@
+@@ -666,7 +667,7 @@
+ finale: project cmd comerr afsd butc tbutc tbudb @ENABLE_KERNEL_MODULE@ libuafs audit kauth log \
+ ptserver tptserver scout bu_utils ubik uss bozo @VFSCK@ volser tvolser tsalvaged \
+ dviced dvolser libafscp \
+- venus update xstat afsmonitor rxdebug libafsrpc \
++ venus venus-test update xstat afsmonitor rxdebug libafsrpc \
+ libafsauthent shlibafsrpc shlibafsauthent libadmin man-pages \
+ platform kopenafs authtools
+ +${COMPILE_PART1} finale ${COMPILE_PART2}
+@@ -674,7 +675,7 @@
+ finale_nolibafs: project cmd comerr afsd butc tbutc tbudb libuafs audit kauth log \
+ ptserver tptserver scout bu_utils ubik tubik uss bozo @VFSCK@ volser tvolser tsalvaged \
+ dviced dvolser libafscp\
+- venus update xstat afsmonitor rxdebug libafsrpc \
++ venus venus-test update xstat afsmonitor rxdebug libafsrpc \
+ libafsauthent shlibafsrpc shlibafsauthent libadmin man-pages \
+ platform kopenafs authtools
+ +${COMPILE_PART1} finale ${COMPILE_PART2}
diff --git a/net/openafs/files/patch-configure.ac b/net/openafs/files/patch-configure.ac
new file mode 100644
index 000000000000..023d6266852a
--- /dev/null
+++ b/net/openafs/files/patch-configure.ac
@@ -0,0 +1,22 @@
+diff --git a/configure.ac b/configure.ac
+index 35c8694..3eb836f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -56,6 +56,7 @@ AS_IF([test x"$KRB5_LIBS" != x],
+ add_to_error_table \
+ encode_krb5_enc_tkt_part \
+ encode_krb5_ticket \
++ krb5_524_conv_principal \
+ krb5_allow_weak_crypto \
+ krb5_c_encrypt \
+ krb5_decode_ticket \
+@@ -69,6 +70,9 @@ AS_IF([test x"$KRB5_LIBS" != x],
+ [AC_CHECK_LIB([krb524], [krb524_convert_creds_kdc],
+ [LIBS="-lkrb524 $LIBS"
+ KRB5_LIBS="-lkrb524 $KRB5_LIBS"
++ AC_CHECK_LIB([krb524], [krb5_524_conv_principal],
++ [AC_DEFINE([HAVE_KRB5_524_CONV_PRINCIPAL], 1,
++ [Define to 1 if you have the `krb5_524_conv_principal' function.])])
+ AC_DEFINE([HAVE_KRB524_CONVERT_CREDS_KDC], 1,
+ [Define to 1 if you have the `krb524_convert_creds_kdc' function.])])])])
+ AC_CHECK_HEADERS([kerberosIV/krb.h])
diff --git a/net/openafs/files/patch-src__afs__FBSD__osi_groups.c b/net/openafs/files/patch-src__afs__FBSD__osi_groups.c
deleted file mode 100644
index 25371fec97e3..000000000000
--- a/net/openafs/files/patch-src__afs__FBSD__osi_groups.c
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/src/afs/FBSD/osi_groups.c b/src/afs/FBSD/osi_groups.c
-index ef62478..e897f46 100644
---- a/src/afs/FBSD/osi_groups.c
-+++ b/src/afs/FBSD/osi_groups.c
-@@ -48,9 +48,17 @@ Afs_xsetgroups(struct thread *td, struct setgroups_args *uap)
- AFS_GUNLOCK();
- crfree(cr);
- if (code)
-+#if (__FreeBSD_version >= 900044)
-+ return sys_setgroups(td, uap); /* afs has shut down */
-+#else
- return setgroups(td, uap); /* afs has shut down */
-+#endif
-
-+#if (__FreeBSD_version >= 900044)
-+ code = sys_setgroups(td, uap);
-+#else
- code = setgroups(td, uap);
-+#endif
- /* Note that if there is a pag already in the new groups we don't
- * overwrite it with the old pag.
- */
diff --git a/net/openafs/files/patch-src__afs__FBSD__osi_vnodeops.c b/net/openafs/files/patch-src__afs__FBSD__osi_vnodeops.c
deleted file mode 100644
index b6fe1838e0e2..000000000000
--- a/net/openafs/files/patch-src__afs__FBSD__osi_vnodeops.c
+++ /dev/null
@@ -1,51 +0,0 @@
-commit 8e14168c9c77850ce0603d56f8aa280f73cb3114
-Author: Ben Kaduk <kaduk@mit.edu>
-Date: Sun Nov 13 13:12:50 2011 -0500
-
- FBSD: cleanup dvp locking for ISDOTDOT
-
- This is a more correct version of
- c2ed2577f9c16df3088158fb593d7aab6e8690d0, which was reverted since
- it caused build issues on some versions and kernel panics on others.
-
- We do want to always unlock dvp before calling over the network
- in the ISDOTDOT case, but be sure to use the proper spelling
- for this operation (as the syntax has changed between FreeBSD versions).
- This requires not unlocking dvp right after the afs_lookup() call if
- it succeeds, letting us just lock the "child" vp (which is actually
- the parent starting from '/') first, and then re-lock dvp.
-
- The error case of afs_lookup() was already handled correctly in
- this logic, which is to say that it was incorrect before this change,
- attempting to recursively lock dvp which causes a panic.
-
- Change-Id: Ide29e47991413dadc3a2b5948f0f6c5bfa2911c4
- Reviewed-on: http://gerrit.openafs.org/6127
- Tested-by: BuildBot <buildbot@rampaginggeek.com>
- Reviewed-by: Derrick Brashear <shadow@dementix.org>
-
-diff --git a/src/afs/FBSD/osi_vnodeops.c b/src/afs/FBSD/osi_vnodeops.c
-index 311b5a9..a9be0c3 100644
---- a/src/afs/FBSD/osi_vnodeops.c
-+++ b/src/afs/FBSD/osi_vnodeops.c
-@@ -503,10 +503,8 @@ afs_vop_lookup(ap)
-
- cnp->cn_flags |= MPSAFE; /* steel */
-
--#ifndef AFS_FBSD70_ENV
- if (flags & ISDOTDOT)
-- VOP_UNLOCK(dvp, 0, p);
--#endif
-+ MA_VOP_UNLOCK(dvp, 0, p);
-
- AFS_GLOCK();
- error = afs_lookup(VTOAFS(dvp), name, &vcp, cnp->cn_cred);
-@@ -531,7 +529,7 @@ afs_vop_lookup(ap)
- * we also always return the vnode locked. */
-
- if (flags & ISDOTDOT) {
-- MA_VOP_UNLOCK(dvp, 0, p);
-+ /* vp before dvp since we go root to leaf, and .. comes first */
- ma_vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
- ma_vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, p);
- /* always return the child locked */
diff --git a/net/openafs/files/patch-src__afs__afs_pioctl.c b/net/openafs/files/patch-src__afs__afs_pioctl.c
deleted file mode 100644
index 676f863c16a4..000000000000
--- a/net/openafs/files/patch-src__afs__afs_pioctl.c
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c
-index cf432d6..2589b79 100644
---- a/src/afs/afs_pioctl.c
-+++ b/src/afs/afs_pioctl.c
-@@ -874,7 +874,11 @@ afs_xioctl(afs_proc_t *p, const struct ioctl_args *uap, register_t *retval)
-
- if (!ioctlDone) {
- # if defined(AFS_FBSD_ENV)
-+# if (__FreeBSD_version >= 900044)
-+ return sys_ioctl(td, uap);
-+# else
- return ioctl(td, uap);
-+# endif
- # elif defined(AFS_OBSD_ENV)
- code = sys_ioctl(p, uap, retval);
- # elif defined(AFS_NBSD_ENV)
diff --git a/net/openafs/files/patch-src__afs__afs_prototypes.h b/net/openafs/files/patch-src__afs__afs_prototypes.h
deleted file mode 100644
index 2f033f476305..000000000000
--- a/net/openafs/files/patch-src__afs__afs_prototypes.h
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h
-index 04f13ad..4135ebb 100644
---- a/src/afs/afs_prototypes.h
-+++ b/src/afs/afs_prototypes.h
-@@ -935,8 +935,9 @@ extern int copyin_afs_ioctl(caddr_t cmarg, struct afs_ioctl *dst);
- #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
- #ifdef AFS_DARWIN100_ENV
- extern int afs3_syscall(afs_proc_t *p, void *args, unsigned int *retval);
--#elif defined(AFS_FBSD90_ENV) || defined(AFS_FBSD82_ENV)
--/* afs3_syscall prototype is in sys/sysproto.h */
-+#elif (defined(AFS_FBSD90_ENV) || defined(AFS_FBSD82_ENV)) && (__FreeBSD_version < 900044)
-+/* afs3_syscall prototype is in sys/sysproto.h
-+ Yes, they put it in, then took it out again (renamed with a sys_ prefix) */
- #elif defined(AFS_FBSD_ENV)
- extern int afs3_syscall(struct thread *p, void *args);
- #elif defined(AFS_NBSD50_ENV)
diff --git a/net/openafs/files/patch-src__afs__afs_server.c b/net/openafs/files/patch-src__afs__afs_server.c
deleted file mode 100644
index d21f8055ba08..000000000000
--- a/net/openafs/files/patch-src__afs__afs_server.c
+++ /dev/null
@@ -1,64 +0,0 @@
-commit 1ef8dc3dfbddcbe5610c276afc627c9fcfe30a65
-Author: Ben Kaduk <kaduk@mit.edu>
-Date: Sat Dec 3 14:37:09 2011 -0500
-
- FBSD: switch afsi_SetServerIPRank implementation
-
- Upstream has removed the ia_net{,mask} elements from
- struct in_ifaddr, so we can no longer use them directly.
- Switch to passing an rx_ifaddr_t (i.e. struct ifaddr*) in instead,
- as that uses a slightly different codepath which still works
- for our purposes.
-
- We compile the kernel module with -Werror, so storing a pointer
- (memcpy return value) in an int is forbidden, hence the conditional
- declaration of 't'.
-
- Change-Id: Ifefef88a353f4bd50a714ad88afa3a6f012fa3a1
- Reviewed-on: http://gerrit.openafs.org/6203
- Tested-by: BuildBot <buildbot@rampaginggeek.com>
- Reviewed-by: Derrick Brashear <shadow@dementix.org>
-
-diff --git a/src/afs/afs_server.c b/src/afs/afs_server.c
-index ad28100..3f4e8d2 100644
---- a/src/afs/afs_server.c
-+++ b/src/afs/afs_server.c
-@@ -1025,7 +1025,7 @@ afsi_SetServerIPRank(struct srvAddr *sa, afs_int32 addr,
- return;
- }
- #else /* AFS_USERSPACE_IP_ADDR */
--#if (! defined(AFS_SUN5_ENV)) && (! defined(AFS_DARWIN_ENV)) && (! defined(AFS_OBSD47_ENV)) && defined(USEIFADDR)
-+#if (! defined(AFS_SUN5_ENV)) && (! defined(AFS_DARWIN_ENV)) && (! defined(AFS_OBSD47_ENV)) && (! defined(AFS_FBSD_ENV)) && defined(USEIFADDR)
- void
- afsi_SetServerIPRank(struct srvAddr *sa, struct in_ifaddr *ifa)
- {
-@@ -1062,7 +1062,7 @@ afsi_SetServerIPRank(struct srvAddr *sa, struct in_ifaddr *ifa)
- #endif /* IFF_POINTTOPOINT */
- }
- #endif /*(!defined(AFS_SUN5_ENV)) && defined(USEIFADDR) */
--#if (defined(AFS_DARWIN_ENV) || defined(AFS_OBSD47_ENV)) && defined(USEIFADDR)
-+#if (defined(AFS_DARWIN_ENV) || defined(AFS_OBSD47_ENV) || defined(AFS_FBSD_ENV)) && defined(USEIFADDR)
- #ifndef afs_min
- #define afs_min(A,B) ((A)<(B)) ? (A) : (B)
- #endif
-@@ -1071,7 +1071,11 @@ afsi_SetServerIPRank(struct srvAddr *sa, rx_ifaddr_t ifa)
- {
- struct sockaddr sout;
- struct sockaddr_in *sin;
-+#if defined(AFS_DARWIN80_ENV) && !defined(UKERNEL)
- int t;
-+#else
-+ void *t;
-+#endif
-
- afs_uint32 subnetmask, myAddr, myNet, myDstaddr, mySubnet, netMask;
- afs_uint32 serverAddr;
-@@ -1393,7 +1397,7 @@ afs_SetServerPrefs(struct srvAddr *sa)
- #else
- TAILQ_FOREACH(ifa, &in_ifaddrhead, ia_link) {
- #endif
-- afsi_SetServerIPRank(sa, ifa);
-+ afsi_SetServerIPRank(sa, &ifa->ia_ifa);
- }}
- #elif defined(AFS_OBSD_ENV)
- {
diff --git a/net/openafs/files/patch-src__aklog__aklog.c b/net/openafs/files/patch-src__aklog__aklog.c
new file mode 100644
index 000000000000..812a646cca5d
--- /dev/null
+++ b/net/openafs/files/patch-src__aklog__aklog.c
@@ -0,0 +1,20 @@
+diff --git a/src/aklog/aklog.c b/src/aklog/aklog.c
+index 43db12f..4e2b2de 100644
+--- a/src/aklog/aklog.c
++++ b/src/aklog/aklog.c
+@@ -216,12 +216,11 @@ Done:
+ #error "Must have either keyblock or session member of krb5_creds"
+ #endif
+
+-#ifdef AFS_DARWIN110_ENV
+-#define HAVE_NO_KRB5_524 /* MITKerberosShim logs but returns success */
++/* MITKerberosShim logs but returns success */
++#if !defined(HAVE_KRB5_524_CONV_PRINCIPAL) || defined(AFS_DARWIN110_ENV) || (!defined(HAVE_KRB5_524_CONVERT_CREDS) && !defined(HAVE_KRB524_CONVERT_CREDS_KDC))
++#define HAVE_NO_KRB5_524
+ #elif !defined(HAVE_KRB5_524_CONVERT_CREDS) && defined(HAVE_KRB524_CONVERT_CREDS_KDC)
+ #define krb5_524_convert_creds krb524_convert_creds_kdc
+-#elif !defined(HAVE_KRB5_524_CONVERT_CREDS) && !defined(HAVE_KRB524_CONVERT_CREDS_KDC)
+-#define HAVE_NO_KRB5_524
+ #endif
+
+ #if USING_HEIMDAL
diff --git a/net/openafs/files/patch-src__budb__Makefile.in b/net/openafs/files/patch-src__budb__Makefile.in
new file mode 100644
index 000000000000..d19a00e39aa7
--- /dev/null
+++ b/net/openafs/files/patch-src__budb__Makefile.in
@@ -0,0 +1,16 @@
+--- openafs-1.6.1/src/budb/Makefile.in 2012-06-24 06:49:53.000000000 +0900
++++ openafs-1.6.1/src/budb/Makefile.in 2012-06-24 06:50:00.000000000 +0900
+@@ -76,10 +76,9 @@
+ #
+ budb_errs.o: budb_errs.c budb_client.h budb_errs.h
+
+-budb_client.h: budb_errs.c
+-
+-budb_errs.c: budb_errs.et budb_client.p.h
+- $(RM) -f budb_client.h budb_errs.c; ${COMPILE_ET} -p ${srcdir} budb_errs -h budb_client
++budb_errs.c budb_client.h: budb_errs.et budb_client.p.h
++ $(RM) -f budb_client.h budb_errs.c
++ ${COMPILE_ET} -p ${srcdir} budb_errs -h budb_client
+
+ budb_errs.h: budb_errs.et
+ ${COMPILE_ET} -p ${srcdir} budb_errs
diff --git a/net/openafs/files/patch-src__config__afs_sysnames.h b/net/openafs/files/patch-src__config__afs_sysnames.h
new file mode 100644
index 000000000000..da68757e29e0
--- /dev/null
+++ b/net/openafs/files/patch-src__config__afs_sysnames.h
@@ -0,0 +1,28 @@
+diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h
+index 74a42e2..454ab4b 100644
+--- a/src/config/afs_sysnames.h
++++ b/src/config/afs_sysnames.h
+@@ -202,7 +202,11 @@
+ #define SYS_NAME_ID_i386_fbsd_80 2117
+ #define SYS_NAME_ID_i386_fbsd_81 2118
+ #define SYS_NAME_ID_i386_fbsd_82 2119
++#define SYS_NAME_ID_i386_fbsd_83 2121
++#define SYS_NAME_ID_i386_fbsd_84 2123
+ #define SYS_NAME_ID_i386_fbsd_90 2120
++#define SYS_NAME_ID_i386_fbsd_91 2122
++#define SYS_NAME_ID_i386_fbsd_100 2130
+
+ #define SYS_NAME_ID_ia64_linux2 2200
+ #define SYS_NAME_ID_ia64_linux22 2201
+@@ -294,7 +298,11 @@
+ #define SYS_NAME_ID_amd64_fbsd_80 3011
+ #define SYS_NAME_ID_amd64_fbsd_81 3012
+ #define SYS_NAME_ID_amd64_fbsd_82 3013
++#define SYS_NAME_ID_amd64_fbsd_83 3014
++#define SYS_NAME_ID_amd64_fbsd_84 3015
+ #define SYS_NAME_ID_amd64_fbsd_90 3020
++#define SYS_NAME_ID_amd64_fbsd_91 3022
++#define SYS_NAME_ID_amd64_fbsd_100 3030
+
+ #define SYS_NAME_ID_amd64_w2k 3400
+
diff --git a/net/openafs/files/patch-src__config__param.amd64_fbsd_100.h b/net/openafs/files/patch-src__config__param.amd64_fbsd_100.h
new file mode 100644
index 000000000000..e8c4c305506d
--- /dev/null
+++ b/net/openafs/files/patch-src__config__param.amd64_fbsd_100.h
@@ -0,0 +1,221 @@
+diff --git a/src/config/param.amd64_fbsd_100.h b/src/config/param.amd64_fbsd_100.h
+new file mode 100644
+index 0000000..fb6533c
+--- /dev/null
++++ b/src/config/param.amd64_fbsd_100.h
+@@ -0,0 +1,215 @@
++#ifndef AFS_PARAM_H
++#define AFS_PARAM_H
++
++/* Machine / Operating system information */
++#define SYS_NAME "amd64_fbsd_100"
++#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_100
++
++#define AFSLITTLE_ENDIAN 1
++#define AFS_HAVE_FFS 1 /* Use system's ffs. */
++#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
++#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
++
++
++#ifndef UKERNEL
++/* This section for kernel libafs compiles only */
++
++#ifndef IGNORE_STDS_H
++#include <sys/param.h>
++#endif
++
++#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
++#define AFS_X86_XBSD_ENV 1
++
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BIT_CLIENT 1
++#define AFS_64BITPOINTER_ENV 1
++#define AFS_64BITUSERPOINTER_ENV 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_FBSD_ENV 1
++#define AFS_FBSD50_ENV 1
++#define AFS_FBSD51_ENV 1
++#define AFS_FBSD52_ENV 1
++#define AFS_FBSD53_ENV 1
++#define AFS_FBSD60_ENV 1
++#define AFS_FBSD61_ENV 1
++#define AFS_FBSD62_ENV 1
++#define AFS_FBSD70_ENV 1
++#define AFS_FBSD71_ENV 1
++#define AFS_FBSD80_ENV 1
++#define AFS_FBSD81_ENV 1
++#define AFS_FBSD90_ENV 1
++#define AFS_FBSD91_ENV 1
++#define AFS_FBSD100_ENV 1
++#define AFS_X86_FBSD_ENV 1
++#define AFS_X86_FBSD50_ENV 1
++#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
++#define AFS_X86_FBSD62_ENV 1
++#define AFS_X86_FBSD70_ENV 1
++#define AFS_X86_FBSD71_ENV 1
++#define AFS_X86_FBSD80_ENV 1
++#define AFS_X86_FBSD81_ENV 1
++#define AFS_X86_FBSD90_ENV 1
++#define AFS_X86_FBSD91_ENV 1
++#define AFS_X86_FBSD100_ENV 1
++#define AFS_X86_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++#define FTRUNC O_TRUNC
++
++#define IUPD 0x0010
++#define IACC 0x0020
++#define ICHG 0x0040
++#define IMOD 0x0080
++
++#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
++ NULL, curproc)
++#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
++ NULL, curproc)
++
++#include <afs/afs_sysnames.h>
++
++#define AFS_VFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_GREEDY43_ENV 1
++#define AFS_ENV 1
++
++#define AFS_SYSCALL 339
++#define AFS_MOUNT_AFS "afs"
++
++#ifndef MOUNT_UFS
++#define MOUNT_UFS "ufs"
++#endif
++
++#ifndef MOUNT_AFS
++#define MOUNT_AFS AFS_MOUNT_AFS
++#endif
++
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
++
++/* Extra kernel definitions (from kdefs file) */
++#ifdef _KERNEL
++#define AFS_GLOBAL_SUNLOCK 1
++#define AFS_VFS34 1 /* What is VFS34??? */
++#define AFS_SHORTGID 0 /* are group id's short? */
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_resid uio_resid
++#define AFS_UIOSYS UIO_SYSSPACE
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES CLBYTES
++#define osi_GetTime(x) microtime(x)
++#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
++#undef AFS_KALLOC_NOSLEEP
++#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
++#define AFS_KFREE(x,y) osi_fbsd_free((x))
++#define v_count v_usecount
++#define v_vfsp v_mount
++#define vfs_bsize mnt_stat.f_bsize
++#define vfs_fsid mnt_stat.f_fsid
++#define va_nodeid va_fileid
++#define vfs_vnodecovered mnt_vnodecovered
++#define direct dirent
++#define vnode_t struct vnode
++
++#ifndef MUTEX_DEFAULT
++#define MUTEX_DEFAULT 0
++#endif /* MUTEX_DEFAULT */
++
++#ifndef SSYS
++#define SSYS 0x00002
++#endif /* SSYS */
++
++#define p_rcred p_ucred
++
++#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
++enum vcexcl { NONEXCL, EXCL };
++
++#ifdef KERNEL
++#ifndef MIN
++#define MIN(A,B) ((A) < (B) ? (A) : (B))
++#endif
++#ifndef MAX
++#define MAX(A,B) ((A) > (B) ? (A) : (B))
++#endif
++#endif /* KERNEL */
++
++#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
++#endif /* _KERNEL */
++
++#else /* !defined(UKERNEL) */
++
++/* This section for user space compiles only */
++
++#define UKERNEL 1 /* user space kernel */
++#define AFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_USR_FBSD50_ENV 1
++#define AFS_USR_FBSD51_ENV 1
++#define AFS_USR_FBSD52_ENV 1
++#define AFS_USR_FBSD53_ENV 1
++#define AFS_USR_FBSD60_ENV 1
++#define AFS_USR_FBSD61_ENV 1
++#define AFS_USR_FBSD70_ENV 1
++#define AFS_USR_FBSD71_ENV 1
++#define AFS_USR_FBSD80_ENV 1
++#define AFS_USR_FBSD81_ENV 1
++#define AFS_USR_FBSD90_ENV 1
++#define AFS_USR_FBSD91_ENV 1
++#define AFS_USR_FBSD100_ENV 1
++#define AFS_USR_FBSD_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++
++#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
++#define AFS_SYSCALL 339
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BITPOINTER_ENV 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_USERSPACE_IP_ADDR 1
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++
++#include <afs/afs_sysnames.h>
++
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_fmode uio_fmode
++#define afsio_resid uio_resid
++#define AFS_UIOSYS 1
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES MCLBYTES
++#define AFS_MINCHANGE 2
++#define VATTR_NULL usr_vattr_null
++
++#define AFS_DIRENT
++#ifndef CMSERVERPREF
++#define CMSERVERPREF
++#endif
++
++#include <sys/param.h>
++#include <sys/types.h>
++#include <sys/mount.h>
++#include <sys/fcntl.h>
++#include <sys/uio.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <limits.h>
++
++#endif /* !defined(UKERNEL) */
++
++/* general user-space compiles */
++
++#if defined(UKERNEL) || !defined(KERNEL)
++#define STDLIB_HAS_MALLOC_PROTOS 1
++#endif
++
++#endif /* AFS_PARAM_H */
diff --git a/net/openafs/files/patch-src__config__param.amd64_fbsd_83.h b/net/openafs/files/patch-src__config__param.amd64_fbsd_83.h
new file mode 100644
index 000000000000..af019fc8d495
--- /dev/null
+++ b/net/openafs/files/patch-src__config__param.amd64_fbsd_83.h
@@ -0,0 +1,218 @@
+diff --git a/src/config/param.amd64_fbsd_83.h b/src/config/param.amd64_fbsd_83.h
+new file mode 100644
+index 0000000..33b0d10
+--- /dev/null
++++ b/src/config/param.amd64_fbsd_83.h
+@@ -0,0 +1,212 @@
++#ifndef AFS_PARAM_H
++#define AFS_PARAM_H
++
++/* Machine / Operating system information */
++#define SYS_NAME "amd64_fbsd_83"
++#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_83
++
++#define AFSLITTLE_ENDIAN 1
++#define AFS_HAVE_FFS 1 /* Use system's ffs. */
++#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
++#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
++
++
++#ifndef UKERNEL
++/* This section for kernel libafs compiles only */
++
++#ifndef IGNORE_STDS_H
++#include <sys/param.h>
++#endif
++
++#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
++#define AFS_X86_XBSD_ENV 1
++
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BIT_CLIENT 1
++#define AFS_64BITPOINTER_ENV 1
++#define AFS_64BITUSERPOINTER_ENV 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_FBSD_ENV 1
++#define AFS_FBSD50_ENV 1
++#define AFS_FBSD51_ENV 1
++#define AFS_FBSD52_ENV 1
++#define AFS_FBSD53_ENV 1
++#define AFS_FBSD60_ENV 1
++#define AFS_FBSD61_ENV 1
++#define AFS_FBSD62_ENV 1
++#define AFS_FBSD70_ENV 1
++#define AFS_FBSD71_ENV 1
++#define AFS_FBSD80_ENV 1
++#define AFS_FBSD81_ENV 1
++#define AFS_FBSD82_ENV 1
++#define AFS_FBSD83_ENV 1
++#define AFS_X86_FBSD_ENV 1
++#define AFS_X86_FBSD50_ENV 1
++#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
++#define AFS_X86_FBSD62_ENV 1
++#define AFS_X86_FBSD70_ENV 1
++#define AFS_X86_FBSD71_ENV 1
++#define AFS_X86_FBSD80_ENV 1
++#define AFS_X86_FBSD81_ENV 1
++#define AFS_X86_FBSD82_ENV 1
++#define AFS_X86_FBSD83_ENV 1
++#define AFS_X86_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++#define FTRUNC O_TRUNC
++
++#define IUPD 0x0010
++#define IACC 0x0020
++#define ICHG 0x0040
++#define IMOD 0x0080
++
++#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
++ NULL, curproc)
++#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
++ NULL, curproc)
++
++#include <afs/afs_sysnames.h>
++
++#define AFS_VFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_GREEDY43_ENV 1
++#define AFS_ENV 1
++
++#define AFS_SYSCALL 339
++#define AFS_MOUNT_AFS "afs"
++
++#ifndef MOUNT_UFS
++#define MOUNT_UFS "ufs"
++#endif
++
++#ifndef MOUNT_AFS
++#define MOUNT_AFS AFS_MOUNT_AFS
++#endif
++
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
++
++/* Extra kernel definitions (from kdefs file) */
++#ifdef _KERNEL
++#define AFS_GLOBAL_SUNLOCK 1
++#define AFS_VFS34 1 /* What is VFS34??? */
++#define AFS_SHORTGID 0 /* are group id's short? */
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_resid uio_resid
++#define AFS_UIOSYS UIO_SYSSPACE
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES CLBYTES
++#define osi_GetTime(x) microtime(x)
++#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
++#undef AFS_KALLOC_NOSLEEP
++#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
++#define AFS_KFREE(x,y) osi_fbsd_free((x))
++#define v_count v_usecount
++#define v_vfsp v_mount
++#define vfs_bsize mnt_stat.f_bsize
++#define vfs_fsid mnt_stat.f_fsid
++#define va_nodeid va_fileid
++#define vfs_vnodecovered mnt_vnodecovered
++#define direct dirent
++#define vnode_t struct vnode
++
++#ifndef MUTEX_DEFAULT
++#define MUTEX_DEFAULT 0
++#endif /* MUTEX_DEFAULT */
++
++#ifndef SSYS
++#define SSYS 0x00002
++#endif /* SSYS */
++
++#define p_rcred p_ucred
++
++#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
++enum vcexcl { NONEXCL, EXCL };
++
++#ifdef KERNEL
++#ifndef MIN
++#define MIN(A,B) ((A) < (B) ? (A) : (B))
++#endif
++#ifndef MAX
++#define MAX(A,B) ((A) > (B) ? (A) : (B))
++#endif
++#endif /* KERNEL */
++
++#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
++#endif /* _KERNEL */
++
++#else /* !defined(UKERNEL) */
++
++/* This section for user space compiles only */
++
++#define UKERNEL 1 /* user space kernel */
++#define AFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_USR_FBSD50_ENV 1
++#define AFS_USR_FBSD51_ENV 1
++#define AFS_USR_FBSD52_ENV 1
++#define AFS_USR_FBSD53_ENV 1
++#define AFS_USR_FBSD60_ENV 1
++#define AFS_USR_FBSD61_ENV 1
++#define AFS_USR_FBSD70_ENV 1
++#define AFS_USR_FBSD71_ENV 1
++#define AFS_USR_FBSD80_ENV 1
++#define AFS_USR_FBSD81_ENV 1
++#define AFS_USR_FBSD82_ENV 1
++#define AFS_USR_FBSD83_ENV 1
++#define AFS_USR_FBSD_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++
++#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
++#define AFS_SYSCALL 339
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BITPOINTER_ENV 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_USERSPACE_IP_ADDR 1
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++
++#include <afs/afs_sysnames.h>
++
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_fmode uio_fmode
++#define afsio_resid uio_resid
++#define AFS_UIOSYS 1
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES MCLBYTES
++#define AFS_MINCHANGE 2
++#define VATTR_NULL usr_vattr_null
++
++#define AFS_DIRENT
++#ifndef CMSERVERPREF
++#define CMSERVERPREF
++#endif
++
++#include <sys/param.h>
++#include <sys/types.h>
++#include <sys/mount.h>
++#include <sys/fcntl.h>
++#include <sys/uio.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <limits.h>
++
++#endif /* !defined(UKERNEL) */
++
++/* general user-space compiles */
++
++#if defined(UKERNEL) || !defined(KERNEL)
++#define STDLIB_HAS_MALLOC_PROTOS 1
++#endif
++
++#endif /* AFS_PARAM_H */
diff --git a/net/openafs/files/patch-src__config__param.amd64_fbsd_84.h b/net/openafs/files/patch-src__config__param.amd64_fbsd_84.h
new file mode 100644
index 000000000000..95915b1f65c6
--- /dev/null
+++ b/net/openafs/files/patch-src__config__param.amd64_fbsd_84.h
@@ -0,0 +1,221 @@
+diff --git a/src/config/param.amd64_fbsd_84.h b/src/config/param.amd64_fbsd_84.h
+new file mode 100644
+index 0000000..fd20d6f
+--- /dev/null
++++ b/src/config/param.amd64_fbsd_84.h
+@@ -0,0 +1,215 @@
++#ifndef AFS_PARAM_H
++#define AFS_PARAM_H
++
++/* Machine / Operating system information */
++#define SYS_NAME "amd64_fbsd_84"
++#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_84
++
++#define AFSLITTLE_ENDIAN 1
++#define AFS_HAVE_FFS 1 /* Use system's ffs. */
++#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
++#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
++
++
++#ifndef UKERNEL
++/* This section for kernel libafs compiles only */
++
++#ifndef IGNORE_STDS_H
++#include <sys/param.h>
++#endif
++
++#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
++#define AFS_X86_XBSD_ENV 1
++
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BIT_CLIENT 1
++#define AFS_64BITPOINTER_ENV 1
++#define AFS_64BITUSERPOINTER_ENV 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_FBSD_ENV 1
++#define AFS_FBSD50_ENV 1
++#define AFS_FBSD51_ENV 1
++#define AFS_FBSD52_ENV 1
++#define AFS_FBSD53_ENV 1
++#define AFS_FBSD60_ENV 1
++#define AFS_FBSD61_ENV 1
++#define AFS_FBSD62_ENV 1
++#define AFS_FBSD70_ENV 1
++#define AFS_FBSD71_ENV 1
++#define AFS_FBSD80_ENV 1
++#define AFS_FBSD81_ENV 1
++#define AFS_FBSD82_ENV 1
++#define AFS_FBSD83_ENV 1
++#define AFS_FBSD84_ENV 1
++#define AFS_X86_FBSD_ENV 1
++#define AFS_X86_FBSD50_ENV 1
++#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
++#define AFS_X86_FBSD62_ENV 1
++#define AFS_X86_FBSD70_ENV 1
++#define AFS_X86_FBSD71_ENV 1
++#define AFS_X86_FBSD80_ENV 1
++#define AFS_X86_FBSD81_ENV 1
++#define AFS_X86_FBSD82_ENV 1
++#define AFS_X86_FBSD83_ENV 1
++#define AFS_X86_FBSD84_ENV 1
++#define AFS_X86_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++#define FTRUNC O_TRUNC
++
++#define IUPD 0x0010
++#define IACC 0x0020
++#define ICHG 0x0040
++#define IMOD 0x0080
++
++#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
++ NULL, curproc)
++#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
++ NULL, curproc)
++
++#include <afs/afs_sysnames.h>
++
++#define AFS_VFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_GREEDY43_ENV 1
++#define AFS_ENV 1
++
++#define AFS_SYSCALL 339
++#define AFS_MOUNT_AFS "afs"
++
++#ifndef MOUNT_UFS
++#define MOUNT_UFS "ufs"
++#endif
++
++#ifndef MOUNT_AFS
++#define MOUNT_AFS AFS_MOUNT_AFS
++#endif
++
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
++
++/* Extra kernel definitions (from kdefs file) */
++#ifdef _KERNEL
++#define AFS_GLOBAL_SUNLOCK 1
++#define AFS_VFS34 1 /* What is VFS34??? */
++#define AFS_SHORTGID 0 /* are group id's short? */
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_resid uio_resid
++#define AFS_UIOSYS UIO_SYSSPACE
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES CLBYTES
++#define osi_GetTime(x) microtime(x)
++#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
++#undef AFS_KALLOC_NOSLEEP
++#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
++#define AFS_KFREE(x,y) osi_fbsd_free((x))
++#define v_count v_usecount
++#define v_vfsp v_mount
++#define vfs_bsize mnt_stat.f_bsize
++#define vfs_fsid mnt_stat.f_fsid
++#define va_nodeid va_fileid
++#define vfs_vnodecovered mnt_vnodecovered
++#define direct dirent
++#define vnode_t struct vnode
++
++#ifndef MUTEX_DEFAULT
++#define MUTEX_DEFAULT 0
++#endif /* MUTEX_DEFAULT */
++
++#ifndef SSYS
++#define SSYS 0x00002
++#endif /* SSYS */
++
++#define p_rcred p_ucred
++
++#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
++enum vcexcl { NONEXCL, EXCL };
++
++#ifdef KERNEL
++#ifndef MIN
++#define MIN(A,B) ((A) < (B) ? (A) : (B))
++#endif
++#ifndef MAX
++#define MAX(A,B) ((A) > (B) ? (A) : (B))
++#endif
++#endif /* KERNEL */
++
++#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
++#endif /* _KERNEL */
++
++#else /* !defined(UKERNEL) */
++
++/* This section for user space compiles only */
++
++#define UKERNEL 1 /* user space kernel */
++#define AFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_USR_FBSD50_ENV 1
++#define AFS_USR_FBSD51_ENV 1
++#define AFS_USR_FBSD52_ENV 1
++#define AFS_USR_FBSD53_ENV 1
++#define AFS_USR_FBSD60_ENV 1
++#define AFS_USR_FBSD61_ENV 1
++#define AFS_USR_FBSD70_ENV 1
++#define AFS_USR_FBSD71_ENV 1
++#define AFS_USR_FBSD80_ENV 1
++#define AFS_USR_FBSD81_ENV 1
++#define AFS_USR_FBSD82_ENV 1
++#define AFS_USR_FBSD83_ENV 1
++#define AFS_USR_FBSD84_ENV 1
++#define AFS_USR_FBSD_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++
++#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
++#define AFS_SYSCALL 339
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BITPOINTER_ENV 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_USERSPACE_IP_ADDR 1
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++
++#include <afs/afs_sysnames.h>
++
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_fmode uio_fmode
++#define afsio_resid uio_resid
++#define AFS_UIOSYS 1
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES MCLBYTES
++#define AFS_MINCHANGE 2
++#define VATTR_NULL usr_vattr_null
++
++#define AFS_DIRENT
++#ifndef CMSERVERPREF
++#define CMSERVERPREF
++#endif
++
++#include <sys/param.h>
++#include <sys/types.h>
++#include <sys/mount.h>
++#include <sys/fcntl.h>
++#include <sys/uio.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <limits.h>
++
++#endif /* !defined(UKERNEL) */
++
++/* general user-space compiles */
++
++#if defined(UKERNEL) || !defined(KERNEL)
++#define STDLIB_HAS_MALLOC_PROTOS 1
++#endif
++
++#endif /* AFS_PARAM_H */
diff --git a/net/openafs/files/patch-src__config__param.amd64_fbsd_91.h b/net/openafs/files/patch-src__config__param.amd64_fbsd_91.h
new file mode 100644
index 000000000000..90c1cd1327af
--- /dev/null
+++ b/net/openafs/files/patch-src__config__param.amd64_fbsd_91.h
@@ -0,0 +1,218 @@
+diff --git a/src/config/param.amd64_fbsd_91.h b/src/config/param.amd64_fbsd_91.h
+new file mode 100644
+index 0000000..ee04a8e
+--- /dev/null
++++ b/src/config/param.amd64_fbsd_91.h
+@@ -0,0 +1,212 @@
++#ifndef AFS_PARAM_H
++#define AFS_PARAM_H
++
++/* Machine / Operating system information */
++#define SYS_NAME "amd64_fbsd_91"
++#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_91
++
++#define AFSLITTLE_ENDIAN 1
++#define AFS_HAVE_FFS 1 /* Use system's ffs. */
++#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
++#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
++
++
++#ifndef UKERNEL
++/* This section for kernel libafs compiles only */
++
++#ifndef IGNORE_STDS_H
++#include <sys/param.h>
++#endif
++
++#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
++#define AFS_X86_XBSD_ENV 1
++
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BIT_CLIENT 1
++#define AFS_64BITPOINTER_ENV 1
++#define AFS_64BITUSERPOINTER_ENV 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_FBSD_ENV 1
++#define AFS_FBSD50_ENV 1
++#define AFS_FBSD51_ENV 1
++#define AFS_FBSD52_ENV 1
++#define AFS_FBSD53_ENV 1
++#define AFS_FBSD60_ENV 1
++#define AFS_FBSD61_ENV 1
++#define AFS_FBSD62_ENV 1
++#define AFS_FBSD70_ENV 1
++#define AFS_FBSD71_ENV 1
++#define AFS_FBSD80_ENV 1
++#define AFS_FBSD81_ENV 1
++#define AFS_FBSD90_ENV 1
++#define AFS_FBSD91_ENV 1
++#define AFS_X86_FBSD_ENV 1
++#define AFS_X86_FBSD50_ENV 1
++#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
++#define AFS_X86_FBSD62_ENV 1
++#define AFS_X86_FBSD70_ENV 1
++#define AFS_X86_FBSD71_ENV 1
++#define AFS_X86_FBSD80_ENV 1
++#define AFS_X86_FBSD81_ENV 1
++#define AFS_X86_FBSD90_ENV 1
++#define AFS_X86_FBSD91_ENV 1
++#define AFS_X86_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++#define FTRUNC O_TRUNC
++
++#define IUPD 0x0010
++#define IACC 0x0020
++#define ICHG 0x0040
++#define IMOD 0x0080
++
++#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
++ NULL, curproc)
++#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
++ NULL, curproc)
++
++#include <afs/afs_sysnames.h>
++
++#define AFS_VFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_GREEDY43_ENV 1
++#define AFS_ENV 1
++
++#define AFS_SYSCALL 339
++#define AFS_MOUNT_AFS "afs"
++
++#ifndef MOUNT_UFS
++#define MOUNT_UFS "ufs"
++#endif
++
++#ifndef MOUNT_AFS
++#define MOUNT_AFS AFS_MOUNT_AFS
++#endif
++
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
++
++/* Extra kernel definitions (from kdefs file) */
++#ifdef _KERNEL
++#define AFS_GLOBAL_SUNLOCK 1
++#define AFS_VFS34 1 /* What is VFS34??? */
++#define AFS_SHORTGID 0 /* are group id's short? */
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_resid uio_resid
++#define AFS_UIOSYS UIO_SYSSPACE
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES CLBYTES
++#define osi_GetTime(x) microtime(x)
++#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
++#undef AFS_KALLOC_NOSLEEP
++#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
++#define AFS_KFREE(x,y) osi_fbsd_free((x))
++#define v_count v_usecount
++#define v_vfsp v_mount
++#define vfs_bsize mnt_stat.f_bsize
++#define vfs_fsid mnt_stat.f_fsid
++#define va_nodeid va_fileid
++#define vfs_vnodecovered mnt_vnodecovered
++#define direct dirent
++#define vnode_t struct vnode
++
++#ifndef MUTEX_DEFAULT
++#define MUTEX_DEFAULT 0
++#endif /* MUTEX_DEFAULT */
++
++#ifndef SSYS
++#define SSYS 0x00002
++#endif /* SSYS */
++
++#define p_rcred p_ucred
++
++#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
++enum vcexcl { NONEXCL, EXCL };
++
++#ifdef KERNEL
++#ifndef MIN
++#define MIN(A,B) ((A) < (B) ? (A) : (B))
++#endif
++#ifndef MAX
++#define MAX(A,B) ((A) > (B) ? (A) : (B))
++#endif
++#endif /* KERNEL */
++
++#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
++#endif /* _KERNEL */
++
++#else /* !defined(UKERNEL) */
++
++/* This section for user space compiles only */
++
++#define UKERNEL 1 /* user space kernel */
++#define AFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_USR_FBSD50_ENV 1
++#define AFS_USR_FBSD51_ENV 1
++#define AFS_USR_FBSD52_ENV 1
++#define AFS_USR_FBSD53_ENV 1
++#define AFS_USR_FBSD60_ENV 1
++#define AFS_USR_FBSD61_ENV 1
++#define AFS_USR_FBSD70_ENV 1
++#define AFS_USR_FBSD71_ENV 1
++#define AFS_USR_FBSD80_ENV 1
++#define AFS_USR_FBSD81_ENV 1
++#define AFS_USR_FBSD90_ENV 1
++#define AFS_USR_FBSD91_ENV 1
++#define AFS_USR_FBSD_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++
++#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
++#define AFS_SYSCALL 339
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BITPOINTER_ENV 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_USERSPACE_IP_ADDR 1
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++
++#include <afs/afs_sysnames.h>
++
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_fmode uio_fmode
++#define afsio_resid uio_resid
++#define AFS_UIOSYS 1
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES MCLBYTES
++#define AFS_MINCHANGE 2
++#define VATTR_NULL usr_vattr_null
++
++#define AFS_DIRENT
++#ifndef CMSERVERPREF
++#define CMSERVERPREF
++#endif
++
++#include <sys/param.h>
++#include <sys/types.h>
++#include <sys/mount.h>
++#include <sys/fcntl.h>
++#include <sys/uio.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <limits.h>
++
++#endif /* !defined(UKERNEL) */
++
++/* general user-space compiles */
++
++#if defined(UKERNEL) || !defined(KERNEL)
++#define STDLIB_HAS_MALLOC_PROTOS 1
++#endif
++
++#endif /* AFS_PARAM_H */
diff --git a/net/openafs/files/patch-src__config__param.i386_fbsd_100.h b/net/openafs/files/patch-src__config__param.i386_fbsd_100.h
new file mode 100644
index 000000000000..9b431d9b210e
--- /dev/null
+++ b/net/openafs/files/patch-src__config__param.i386_fbsd_100.h
@@ -0,0 +1,219 @@
+diff --git a/src/config/param.i386_fbsd_100.h b/src/config/param.i386_fbsd_100.h
+new file mode 100644
+index 0000000..c07853f
+--- /dev/null
++++ b/src/config/param.i386_fbsd_100.h
+@@ -0,0 +1,213 @@
++#ifndef AFS_PARAM_H
++#define AFS_PARAM_H
++
++/* Machine / Operating system information */
++#define SYS_NAME "i386_fbsd_100"
++#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_100
++
++#define AFSLITTLE_ENDIAN 1
++#define AFS_HAVE_FFS 1 /* Use system's ffs. */
++#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
++#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
++#define AFS_FAKEOPEN_ENV 1 /* call afs_FakeOpen as if !AFS_VM_RDWR */
++
++
++#ifndef UKERNEL
++/* This section for kernel libafs compiles only */
++
++#ifndef IGNORE_STDS_H
++#include <sys/param.h>
++#endif
++
++#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
++#define AFS_X86_XBSD_ENV 1
++
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BIT_CLIENT 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_FBSD_ENV 1
++#define AFS_FBSD50_ENV 1
++#define AFS_FBSD51_ENV 1
++#define AFS_FBSD52_ENV 1
++#define AFS_FBSD53_ENV 1
++#define AFS_FBSD60_ENV 1
++#define AFS_FBSD61_ENV 1
++#define AFS_FBSD62_ENV 1
++#define AFS_FBSD70_ENV 1
++#define AFS_FBSD71_ENV 1
++#define AFS_FBSD80_ENV 1
++#define AFS_FBSD81_ENV 1
++#define AFS_FBSD90_ENV 1
++#define AFS_FBSD91_ENV 1
++#define AFS_FBSD100_ENV 1
++#define AFS_X86_FBSD_ENV 1
++#define AFS_X86_FBSD50_ENV 1
++#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
++#define AFS_X86_FBSD62_ENV 1
++#define AFS_X86_FBSD70_ENV 1
++#define AFS_X86_FBSD71_ENV 1
++#define AFS_X86_FBSD80_ENV 1
++#define AFS_X86_FBSD81_ENV 1
++#define AFS_X86_FBSD90_ENV 1
++#define AFS_X86_FBSD91_ENV 1
++#define AFS_X86_FBSD100_ENV 1
++#define AFS_X86_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++#define FTRUNC O_TRUNC
++
++#define IUPD 0x0010
++#define IACC 0x0020
++#define ICHG 0x0040
++#define IMOD 0x0080
++
++#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
++ NULL, curproc)
++#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
++ NULL, curproc)
++
++#include <afs/afs_sysnames.h>
++
++#define AFS_VFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_GREEDY43_ENV 1
++#define AFS_ENV 1
++
++#define AFS_SYSCALL 339
++#define AFS_MOUNT_AFS "afs"
++
++#ifndef MOUNT_UFS
++#define MOUNT_UFS "ufs"
++#endif
++
++#ifndef MOUNT_AFS
++#define MOUNT_AFS AFS_MOUNT_AFS
++#endif
++
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
++
++/* Extra kernel definitions (from kdefs file) */
++#ifdef _KERNEL
++#define AFS_GLOBAL_SUNLOCK 1
++#define AFS_VFS34 1 /* What is VFS34??? */
++#define AFS_SHORTGID 0 /* are group id's short? */
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_resid uio_resid
++#define AFS_UIOSYS UIO_SYSSPACE
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES CLBYTES
++#define osi_GetTime(x) microtime(x)
++#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
++#undef AFS_KALLOC_NOSLEEP
++#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
++#define AFS_KFREE(x,y) osi_fbsd_free((x))
++#define v_count v_usecount
++#define v_vfsp v_mount
++#define vfs_bsize mnt_stat.f_bsize
++#define vfs_fsid mnt_stat.f_fsid
++#define va_nodeid va_fileid
++#define vfs_vnodecovered mnt_vnodecovered
++#define direct dirent
++#define vnode_t struct vnode
++
++#ifndef MUTEX_DEFAULT
++#define MUTEX_DEFAULT 0
++#endif /* MUTEX_DEFAULT */
++
++#ifndef SSYS
++#define SSYS 0x00002
++#endif /* SSYS */
++
++#define p_rcred p_ucred
++
++#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
++enum vcexcl { NONEXCL, EXCL };
++
++#ifdef KERNEL
++#ifndef MIN
++#define MIN(A,B) ((A) < (B) ? (A) : (B))
++#endif
++#ifndef MAX
++#define MAX(A,B) ((A) > (B) ? (A) : (B))
++#endif
++#endif /* KERNEL */
++
++#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
++#endif /* _KERNEL */
++
++#else /* !defined(UKERNEL) */
++
++/* This section for user space compiles only */
++
++#define UKERNEL 1 /* user space kernel */
++#define AFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_USR_FBSD50_ENV 1
++#define AFS_USR_FBSD51_ENV 1
++#define AFS_USR_FBSD52_ENV 1
++#define AFS_USR_FBSD53_ENV 1
++#define AFS_USR_FBSD60_ENV 1
++#define AFS_USR_FBSD61_ENV 1
++#define AFS_USR_FBSD70_ENV 1
++#define AFS_USR_FBSD71_ENV 1
++#define AFS_USR_FBSD80_ENV 1
++#define AFS_USR_FBSD81_ENV 1
++#define AFS_USR_FBSD90_ENV 1
++#define AFS_USR_FBSD91_ENV 1
++#define AFS_USR_FBSD100_ENV 1
++#define AFS_USR_FBSD_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++
++#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
++#define AFS_SYSCALL 339
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_USERSPACE_IP_ADDR 1
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++
++#include <afs/afs_sysnames.h>
++
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_fmode uio_fmode
++#define afsio_resid uio_resid
++#define AFS_UIOSYS 1
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES MCLBYTES
++#define AFS_MINCHANGE 2
++#define VATTR_NULL usr_vattr_null
++
++#define AFS_DIRENT
++#ifndef CMSERVERPREF
++#define CMSERVERPREF
++#endif
++
++#include <sys/param.h>
++#include <sys/types.h>
++#include <sys/mount.h>
++#include <sys/fcntl.h>
++#include <sys/uio.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <limits.h>
++
++#endif /* !defined(UKERNEL) */
++
++/* general user-space compiles */
++
++#if defined(UKERNEL) || !defined(KERNEL)
++#define STDLIB_HAS_MALLOC_PROTOS 1
++#endif
++
++#endif /* AFS_PARAM_H */
diff --git a/net/openafs/files/patch-src__config__param.i386_fbsd_83.h b/net/openafs/files/patch-src__config__param.i386_fbsd_83.h
new file mode 100644
index 000000000000..eb66755d0345
--- /dev/null
+++ b/net/openafs/files/patch-src__config__param.i386_fbsd_83.h
@@ -0,0 +1,216 @@
+diff --git a/src/config/param.i386_fbsd_83.h b/src/config/param.i386_fbsd_83.h
+new file mode 100644
+index 0000000..d00b6ad
+--- /dev/null
++++ b/src/config/param.i386_fbsd_83.h
+@@ -0,0 +1,210 @@
++#ifndef AFS_PARAM_H
++#define AFS_PARAM_H
++
++/* Machine / Operating system information */
++#define SYS_NAME "i386_fbsd_83"
++#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_83
++
++#define AFSLITTLE_ENDIAN 1
++#define AFS_HAVE_FFS 1 /* Use system's ffs. */
++#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
++#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
++#define AFS_FAKEOPEN_ENV 1 /* call afs_FakeOpen as if !AFS_VM_RDWR */
++
++
++#ifndef UKERNEL
++/* This section for kernel libafs compiles only */
++
++#ifndef IGNORE_STDS_H
++#include <sys/param.h>
++#endif
++
++#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
++#define AFS_X86_XBSD_ENV 1
++
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BIT_CLIENT 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_FBSD_ENV 1
++#define AFS_FBSD50_ENV 1
++#define AFS_FBSD51_ENV 1
++#define AFS_FBSD52_ENV 1
++#define AFS_FBSD53_ENV 1
++#define AFS_FBSD60_ENV 1
++#define AFS_FBSD61_ENV 1
++#define AFS_FBSD62_ENV 1
++#define AFS_FBSD70_ENV 1
++#define AFS_FBSD71_ENV 1
++#define AFS_FBSD80_ENV 1
++#define AFS_FBSD81_ENV 1
++#define AFS_FBSD82_ENV 1
++#define AFS_FBSD83_ENV 1
++#define AFS_X86_FBSD_ENV 1
++#define AFS_X86_FBSD50_ENV 1
++#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
++#define AFS_X86_FBSD62_ENV 1
++#define AFS_X86_FBSD70_ENV 1
++#define AFS_X86_FBSD71_ENV 1
++#define AFS_X86_FBSD80_ENV 1
++#define AFS_X86_FBSD81_ENV 1
++#define AFS_X86_FBSD82_ENV 1
++#define AFS_X86_FBSD83_ENV 1
++#define AFS_X86_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++#define FTRUNC O_TRUNC
++
++#define IUPD 0x0010
++#define IACC 0x0020
++#define ICHG 0x0040
++#define IMOD 0x0080
++
++#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
++ NULL, curproc)
++#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
++ NULL, curproc)
++
++#include <afs/afs_sysnames.h>
++
++#define AFS_VFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_GREEDY43_ENV 1
++#define AFS_ENV 1
++
++#define AFS_SYSCALL 339
++#define AFS_MOUNT_AFS "afs"
++
++#ifndef MOUNT_UFS
++#define MOUNT_UFS "ufs"
++#endif
++
++#ifndef MOUNT_AFS
++#define MOUNT_AFS AFS_MOUNT_AFS
++#endif
++
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
++
++/* Extra kernel definitions (from kdefs file) */
++#ifdef _KERNEL
++#define AFS_GLOBAL_SUNLOCK 1
++#define AFS_VFS34 1 /* What is VFS34??? */
++#define AFS_SHORTGID 0 /* are group id's short? */
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_resid uio_resid
++#define AFS_UIOSYS UIO_SYSSPACE
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES CLBYTES
++#define osi_GetTime(x) microtime(x)
++#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
++#undef AFS_KALLOC_NOSLEEP
++#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
++#define AFS_KFREE(x,y) osi_fbsd_free((x))
++#define v_count v_usecount
++#define v_vfsp v_mount
++#define vfs_bsize mnt_stat.f_bsize
++#define vfs_fsid mnt_stat.f_fsid
++#define va_nodeid va_fileid
++#define vfs_vnodecovered mnt_vnodecovered
++#define direct dirent
++#define vnode_t struct vnode
++
++#ifndef MUTEX_DEFAULT
++#define MUTEX_DEFAULT 0
++#endif /* MUTEX_DEFAULT */
++
++#ifndef SSYS
++#define SSYS 0x00002
++#endif /* SSYS */
++
++#define p_rcred p_ucred
++
++#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
++enum vcexcl { NONEXCL, EXCL };
++
++#ifdef KERNEL
++#ifndef MIN
++#define MIN(A,B) ((A) < (B) ? (A) : (B))
++#endif
++#ifndef MAX
++#define MAX(A,B) ((A) > (B) ? (A) : (B))
++#endif
++#endif /* KERNEL */
++
++#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
++#endif /* _KERNEL */
++
++#else /* !defined(UKERNEL) */
++
++/* This section for user space compiles only */
++
++#define UKERNEL 1 /* user space kernel */
++#define AFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_USR_FBSD50_ENV 1
++#define AFS_USR_FBSD51_ENV 1
++#define AFS_USR_FBSD52_ENV 1
++#define AFS_USR_FBSD53_ENV 1
++#define AFS_USR_FBSD60_ENV 1
++#define AFS_USR_FBSD61_ENV 1
++#define AFS_USR_FBSD70_ENV 1
++#define AFS_USR_FBSD71_ENV 1
++#define AFS_USR_FBSD80_ENV 1
++#define AFS_USR_FBSD81_ENV 1
++#define AFS_USR_FBSD82_ENV 1
++#define AFS_USR_FBSD83_ENV 1
++#define AFS_USR_FBSD_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++
++#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
++#define AFS_SYSCALL 339
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_USERSPACE_IP_ADDR 1
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++
++#include <afs/afs_sysnames.h>
++
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_fmode uio_fmode
++#define afsio_resid uio_resid
++#define AFS_UIOSYS 1
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES MCLBYTES
++#define AFS_MINCHANGE 2
++#define VATTR_NULL usr_vattr_null
++
++#define AFS_DIRENT
++#ifndef CMSERVERPREF
++#define CMSERVERPREF
++#endif
++
++#include <sys/param.h>
++#include <sys/types.h>
++#include <sys/mount.h>
++#include <sys/fcntl.h>
++#include <sys/uio.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <limits.h>
++
++#endif /* !defined(UKERNEL) */
++
++/* general user-space compiles */
++
++#if defined(UKERNEL) || !defined(KERNEL)
++#define STDLIB_HAS_MALLOC_PROTOS 1
++#endif
++
++#endif /* AFS_PARAM_H */
diff --git a/net/openafs/files/patch-src__config__param.i386_fbsd_84.h b/net/openafs/files/patch-src__config__param.i386_fbsd_84.h
new file mode 100644
index 000000000000..c4221981bb18
--- /dev/null
+++ b/net/openafs/files/patch-src__config__param.i386_fbsd_84.h
@@ -0,0 +1,219 @@
+diff --git a/src/config/param.i386_fbsd_84.h b/src/config/param.i386_fbsd_84.h
+new file mode 100644
+index 0000000..1f78624
+--- /dev/null
++++ b/src/config/param.i386_fbsd_84.h
+@@ -0,0 +1,213 @@
++#ifndef AFS_PARAM_H
++#define AFS_PARAM_H
++
++/* Machine / Operating system information */
++#define SYS_NAME "i386_fbsd_84"
++#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_84
++
++#define AFSLITTLE_ENDIAN 1
++#define AFS_HAVE_FFS 1 /* Use system's ffs. */
++#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
++#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
++#define AFS_FAKEOPEN_ENV 1 /* call afs_FakeOpen as if !AFS_VM_RDWR */
++
++
++#ifndef UKERNEL
++/* This section for kernel libafs compiles only */
++
++#ifndef IGNORE_STDS_H
++#include <sys/param.h>
++#endif
++
++#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
++#define AFS_X86_XBSD_ENV 1
++
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BIT_CLIENT 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_FBSD_ENV 1
++#define AFS_FBSD50_ENV 1
++#define AFS_FBSD51_ENV 1
++#define AFS_FBSD52_ENV 1
++#define AFS_FBSD53_ENV 1
++#define AFS_FBSD60_ENV 1
++#define AFS_FBSD61_ENV 1
++#define AFS_FBSD62_ENV 1
++#define AFS_FBSD70_ENV 1
++#define AFS_FBSD71_ENV 1
++#define AFS_FBSD80_ENV 1
++#define AFS_FBSD81_ENV 1
++#define AFS_FBSD82_ENV 1
++#define AFS_FBSD83_ENV 1
++#define AFS_FBSD84_ENV 1
++#define AFS_X86_FBSD_ENV 1
++#define AFS_X86_FBSD50_ENV 1
++#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
++#define AFS_X86_FBSD62_ENV 1
++#define AFS_X86_FBSD70_ENV 1
++#define AFS_X86_FBSD71_ENV 1
++#define AFS_X86_FBSD80_ENV 1
++#define AFS_X86_FBSD81_ENV 1
++#define AFS_X86_FBSD82_ENV 1
++#define AFS_X86_FBSD83_ENV 1
++#define AFS_X86_FBSD84_ENV 1
++#define AFS_X86_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++#define FTRUNC O_TRUNC
++
++#define IUPD 0x0010
++#define IACC 0x0020
++#define ICHG 0x0040
++#define IMOD 0x0080
++
++#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
++ NULL, curproc)
++#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
++ NULL, curproc)
++
++#include <afs/afs_sysnames.h>
++
++#define AFS_VFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_GREEDY43_ENV 1
++#define AFS_ENV 1
++
++#define AFS_SYSCALL 339
++#define AFS_MOUNT_AFS "afs"
++
++#ifndef MOUNT_UFS
++#define MOUNT_UFS "ufs"
++#endif
++
++#ifndef MOUNT_AFS
++#define MOUNT_AFS AFS_MOUNT_AFS
++#endif
++
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
++
++/* Extra kernel definitions (from kdefs file) */
++#ifdef _KERNEL
++#define AFS_GLOBAL_SUNLOCK 1
++#define AFS_VFS34 1 /* What is VFS34??? */
++#define AFS_SHORTGID 0 /* are group id's short? */
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_resid uio_resid
++#define AFS_UIOSYS UIO_SYSSPACE
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES CLBYTES
++#define osi_GetTime(x) microtime(x)
++#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
++#undef AFS_KALLOC_NOSLEEP
++#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
++#define AFS_KFREE(x,y) osi_fbsd_free((x))
++#define v_count v_usecount
++#define v_vfsp v_mount
++#define vfs_bsize mnt_stat.f_bsize
++#define vfs_fsid mnt_stat.f_fsid
++#define va_nodeid va_fileid
++#define vfs_vnodecovered mnt_vnodecovered
++#define direct dirent
++#define vnode_t struct vnode
++
++#ifndef MUTEX_DEFAULT
++#define MUTEX_DEFAULT 0
++#endif /* MUTEX_DEFAULT */
++
++#ifndef SSYS
++#define SSYS 0x00002
++#endif /* SSYS */
++
++#define p_rcred p_ucred
++
++#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
++enum vcexcl { NONEXCL, EXCL };
++
++#ifdef KERNEL
++#ifndef MIN
++#define MIN(A,B) ((A) < (B) ? (A) : (B))
++#endif
++#ifndef MAX
++#define MAX(A,B) ((A) > (B) ? (A) : (B))
++#endif
++#endif /* KERNEL */
++
++#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
++#endif /* _KERNEL */
++
++#else /* !defined(UKERNEL) */
++
++/* This section for user space compiles only */
++
++#define UKERNEL 1 /* user space kernel */
++#define AFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_USR_FBSD50_ENV 1
++#define AFS_USR_FBSD51_ENV 1
++#define AFS_USR_FBSD52_ENV 1
++#define AFS_USR_FBSD53_ENV 1
++#define AFS_USR_FBSD60_ENV 1
++#define AFS_USR_FBSD61_ENV 1
++#define AFS_USR_FBSD70_ENV 1
++#define AFS_USR_FBSD71_ENV 1
++#define AFS_USR_FBSD80_ENV 1
++#define AFS_USR_FBSD81_ENV 1
++#define AFS_USR_FBSD82_ENV 1
++#define AFS_USR_FBSD83_ENV 1
++#define AFS_USR_FBSD84_ENV 1
++#define AFS_USR_FBSD_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++
++#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
++#define AFS_SYSCALL 339
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_USERSPACE_IP_ADDR 1
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++
++#include <afs/afs_sysnames.h>
++
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_fmode uio_fmode
++#define afsio_resid uio_resid
++#define AFS_UIOSYS 1
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES MCLBYTES
++#define AFS_MINCHANGE 2
++#define VATTR_NULL usr_vattr_null
++
++#define AFS_DIRENT
++#ifndef CMSERVERPREF
++#define CMSERVERPREF
++#endif
++
++#include <sys/param.h>
++#include <sys/types.h>
++#include <sys/mount.h>
++#include <sys/fcntl.h>
++#include <sys/uio.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <limits.h>
++
++#endif /* !defined(UKERNEL) */
++
++/* general user-space compiles */
++
++#if defined(UKERNEL) || !defined(KERNEL)
++#define STDLIB_HAS_MALLOC_PROTOS 1
++#endif
++
++#endif /* AFS_PARAM_H */
diff --git a/net/openafs/files/patch-src__config__param.i386_fbsd_91.h b/net/openafs/files/patch-src__config__param.i386_fbsd_91.h
new file mode 100644
index 000000000000..a846c8d5b529
--- /dev/null
+++ b/net/openafs/files/patch-src__config__param.i386_fbsd_91.h
@@ -0,0 +1,216 @@
+diff --git a/src/config/param.i386_fbsd_91.h b/src/config/param.i386_fbsd_91.h
+new file mode 100644
+index 0000000..125c5f9
+--- /dev/null
++++ b/src/config/param.i386_fbsd_91.h
+@@ -0,0 +1,210 @@
++#ifndef AFS_PARAM_H
++#define AFS_PARAM_H
++
++/* Machine / Operating system information */
++#define SYS_NAME "i386_fbsd_91"
++#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_91
++
++#define AFSLITTLE_ENDIAN 1
++#define AFS_HAVE_FFS 1 /* Use system's ffs. */
++#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
++#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
++#define AFS_FAKEOPEN_ENV 1 /* call afs_FakeOpen as if !AFS_VM_RDWR */
++
++
++#ifndef UKERNEL
++/* This section for kernel libafs compiles only */
++
++#ifndef IGNORE_STDS_H
++#include <sys/param.h>
++#endif
++
++#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
++#define AFS_X86_XBSD_ENV 1
++
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BIT_CLIENT 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_FBSD_ENV 1
++#define AFS_FBSD50_ENV 1
++#define AFS_FBSD51_ENV 1
++#define AFS_FBSD52_ENV 1
++#define AFS_FBSD53_ENV 1
++#define AFS_FBSD60_ENV 1
++#define AFS_FBSD61_ENV 1
++#define AFS_FBSD62_ENV 1
++#define AFS_FBSD70_ENV 1
++#define AFS_FBSD71_ENV 1
++#define AFS_FBSD80_ENV 1
++#define AFS_FBSD81_ENV 1
++#define AFS_FBSD90_ENV 1
++#define AFS_FBSD91_ENV 1
++#define AFS_X86_FBSD_ENV 1
++#define AFS_X86_FBSD50_ENV 1
++#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
++#define AFS_X86_FBSD62_ENV 1
++#define AFS_X86_FBSD70_ENV 1
++#define AFS_X86_FBSD71_ENV 1
++#define AFS_X86_FBSD80_ENV 1
++#define AFS_X86_FBSD81_ENV 1
++#define AFS_X86_FBSD90_ENV 1
++#define AFS_X86_FBSD91_ENV 1
++#define AFS_X86_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++#define FTRUNC O_TRUNC
++
++#define IUPD 0x0010
++#define IACC 0x0020
++#define ICHG 0x0040
++#define IMOD 0x0080
++
++#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
++ NULL, curproc)
++#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
++ NULL, curproc)
++
++#include <afs/afs_sysnames.h>
++
++#define AFS_VFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_GREEDY43_ENV 1
++#define AFS_ENV 1
++
++#define AFS_SYSCALL 339
++#define AFS_MOUNT_AFS "afs"
++
++#ifndef MOUNT_UFS
++#define MOUNT_UFS "ufs"
++#endif
++
++#ifndef MOUNT_AFS
++#define MOUNT_AFS AFS_MOUNT_AFS
++#endif
++
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
++
++/* Extra kernel definitions (from kdefs file) */
++#ifdef _KERNEL
++#define AFS_GLOBAL_SUNLOCK 1
++#define AFS_VFS34 1 /* What is VFS34??? */
++#define AFS_SHORTGID 0 /* are group id's short? */
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_resid uio_resid
++#define AFS_UIOSYS UIO_SYSSPACE
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES CLBYTES
++#define osi_GetTime(x) microtime(x)
++#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
++#undef AFS_KALLOC_NOSLEEP
++#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
++#define AFS_KFREE(x,y) osi_fbsd_free((x))
++#define v_count v_usecount
++#define v_vfsp v_mount
++#define vfs_bsize mnt_stat.f_bsize
++#define vfs_fsid mnt_stat.f_fsid
++#define va_nodeid va_fileid
++#define vfs_vnodecovered mnt_vnodecovered
++#define direct dirent
++#define vnode_t struct vnode
++
++#ifndef MUTEX_DEFAULT
++#define MUTEX_DEFAULT 0
++#endif /* MUTEX_DEFAULT */
++
++#ifndef SSYS
++#define SSYS 0x00002
++#endif /* SSYS */
++
++#define p_rcred p_ucred
++
++#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
++enum vcexcl { NONEXCL, EXCL };
++
++#ifdef KERNEL
++#ifndef MIN
++#define MIN(A,B) ((A) < (B) ? (A) : (B))
++#endif
++#ifndef MAX
++#define MAX(A,B) ((A) > (B) ? (A) : (B))
++#endif
++#endif /* KERNEL */
++
++#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
++#endif /* _KERNEL */
++
++#else /* !defined(UKERNEL) */
++
++/* This section for user space compiles only */
++
++#define UKERNEL 1 /* user space kernel */
++#define AFS_ENV 1
++#define AFS_VFSINCL_ENV 1
++#define AFS_USR_FBSD50_ENV 1
++#define AFS_USR_FBSD51_ENV 1
++#define AFS_USR_FBSD52_ENV 1
++#define AFS_USR_FBSD53_ENV 1
++#define AFS_USR_FBSD60_ENV 1
++#define AFS_USR_FBSD61_ENV 1
++#define AFS_USR_FBSD70_ENV 1
++#define AFS_USR_FBSD71_ENV 1
++#define AFS_USR_FBSD80_ENV 1
++#define AFS_USR_FBSD81_ENV 1
++#define AFS_USR_FBSD90_ENV 1
++#define AFS_USR_FBSD91_ENV 1
++#define AFS_USR_FBSD_ENV 1
++#undef AFS_NONFSTRANS
++#define AFS_NONFSTRANS 1
++
++#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
++#define AFS_SYSCALL 339
++#define AFS_NAMEI_ENV 1 /* User space interface to file system */
++#define AFS_64BIT_ENV 1
++#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
++#define AFS_USERSPACE_IP_ADDR 1
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
++
++#include <afs/afs_sysnames.h>
++
++#define afsio_iov uio_iov
++#define afsio_iovcnt uio_iovcnt
++#define afsio_offset uio_offset
++#define afsio_seg uio_segflg
++#define afsio_fmode uio_fmode
++#define afsio_resid uio_resid
++#define AFS_UIOSYS 1
++#define AFS_UIOUSER UIO_USERSPACE
++#define AFS_CLBYTES MCLBYTES
++#define AFS_MINCHANGE 2
++#define VATTR_NULL usr_vattr_null
++
++#define AFS_DIRENT
++#ifndef CMSERVERPREF
++#define CMSERVERPREF
++#endif
++
++#include <sys/param.h>
++#include <sys/types.h>
++#include <sys/mount.h>
++#include <sys/fcntl.h>
++#include <sys/uio.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <limits.h>
++
++#endif /* !defined(UKERNEL) */
++
++/* general user-space compiles */
++
++#if defined(UKERNEL) || !defined(KERNEL)
++#define STDLIB_HAS_MALLOC_PROTOS 1
++#endif
++
++#endif /* AFS_PARAM_H */
diff --git a/net/openafs/files/patch-src__libafs__Makefile.common.in b/net/openafs/files/patch-src__libafs__Makefile.common.in
new file mode 100644
index 000000000000..78c0b298a21e
--- /dev/null
+++ b/net/openafs/files/patch-src__libafs__Makefile.common.in
@@ -0,0 +1,11 @@
+--- openafs-1.6.1/src/libafs/Makefile.common.in.orig 2012-03-27 08:03:34.000000000 +0900
++++ openafs-1.6.1/src/libafs/Makefile.common.in 2012-06-24 09:26:33.000000000 +0900
+@@ -58,7 +58,7 @@
+
+ all: setup $(COMPDIRS)
+
+-single_compdir single_instdir single_destdir: setup
++single_compdir single_instdir single_destdir: setup vnode_if.h
+ cd $(KOBJ) ; \
+ echo $(MAKE) DESTDIR=${DESTDIR} $@_libafs; \
+ $(MAKE) DESTDIR=${DESTDIR} $@_libafs
diff --git a/net/openafs/files/patch-src__libafs__MakefileProto.FBSD.in b/net/openafs/files/patch-src__libafs__MakefileProto.FBSD.in
new file mode 100644
index 000000000000..b5045f44924a
--- /dev/null
+++ b/net/openafs/files/patch-src__libafs__MakefileProto.FBSD.in
@@ -0,0 +1,21 @@
+--- openafs-1.6.1/src/libafs/MakefileProto.FBSD.in.orig 2012-03-27 08:03:34.000000000 +0900
++++ openafs-1.6.1/src/libafs/MakefileProto.FBSD.in 2012-06-24 04:58:07.000000000 +0900
+@@ -71,12 +71,15 @@
+ ln -fs ../Makefile.common $(KOBJ)/Makefile.common
+ -$(RM) -f h net netinet rpc ufs nfs machine sys vm
+ -ln -fs ${KSRC}/net net
+- -ln -fs ${KSRC}/@HOST_CPU@/include machine
++<amd64 i386>
++ -ln -fs ${KSRC}/x86/include x86
++<all>
++ -ln -fs ${KSRC}/${ARCH}/include machine
+ -ln -fs ${KSRC}/netinet netinet
+ -ln -fs ${KSRC}/nfs nfs
+-<all -fbsd_71 -fbsd_72 -fbsd_72 -fbsd_73 -fbsd_74 -fbsd_80 -fbsd_81 -fbsd_82 -fbsd_90>
++<all -fbsd_71 -fbsd_72 -fbsd_72 -fbsd_73 -fbsd_74 -fbsd_80 -fbsd_81 -fbsd_82 -fbsd_83 -fbsd_84 -fbsd_90 -fbsd_91 -fbsd_100>
+ -ln -fs /usr/include/rpc rpc
+-<fbsd_71 fbsd_72 fbsd_73 fbsd_74 fbsd_80 fbsd_81 fbsd_82 fbsd_90>
++<fbsd_71 fbsd_72 fbsd_73 fbsd_74 fbsd_80 fbsd_81 fbsd_82 fbsd_83 fbsd_84 fbsd_90 fbsd_91 fbsd_100>
+ -ln -fs ${KSRC}/rpc rpc
+ <all>
+ -ln -fs ${KSRC}/sys sys
diff --git a/net/openafs/files/patch-src__libuafs__MakefileProto.FBSD.in b/net/openafs/files/patch-src__libuafs__MakefileProto.FBSD.in
new file mode 100644
index 000000000000..296b5cafdef3
--- /dev/null
+++ b/net/openafs/files/patch-src__libuafs__MakefileProto.FBSD.in
@@ -0,0 +1,14 @@
+--- a/src/libuafs/MakefileProto.FBSD.in 2012-06-23 16:53:23.000000000 +0000
++++ b/src/libuafs/MakefileProto.FBSD.in 2012-06-23 16:54:13.000000000 +0000
+@@ -23,9 +23,9 @@
+
+ TEST_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV -DAFS_FBSD50_ENV $(XCFLAGS)
+ TEST_LDFLAGS=
+-<all -fbsd_62 -fbsd_70 -fbsd_71 -fbsd_72 -fbsd_73 -fbsd_74 -fbsd_80 -fbsd_81 -fbsd_90>
++<all -fbsd_62 -fbsd_70 -fbsd_71 -fbsd_72 -fbsd_73 -fbsd_74 -fbsd_80 -fbsd_81 -fbsd_82 -fbsd_83 -fbsd_84 -fbsd_90 -fbsd_91 -fbsd_100>
+ TEST_LIBS=-lc_r
+-<fbsd_62 fbsd_70 fbsd_71 fbsd_72 fbsd_73 fbsd_74 fbsd_80 fbsd_81 fbsd_82 fbsd_90>
++<fbsd_62 fbsd_70 fbsd_71 fbsd_72 fbsd_73 fbsd_74 fbsd_80 fbsd_81 fbsd_82 fbsd_83 fbsd_84 fbsd_90 fbsd_91 fbsd_100>
+ TEST_LIBS=-lpthread
+ <all>
+
diff --git a/net/openafs/files/patch-src__rx__FBSD__rx_knet.c b/net/openafs/files/patch-src__rx__FBSD__rx_knet.c
deleted file mode 100644
index 85d53d3bd81c..000000000000
--- a/net/openafs/files/patch-src__rx__FBSD__rx_knet.c
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/src/rx/FBSD/rx_knet.c b/src/rx/FBSD/rx_knet.c
-index c6d2d84..ded3f7c 100644
---- a/src/rx/FBSD/rx_knet.c
-+++ b/src/rx/FBSD/rx_knet.c
-@@ -92,7 +92,11 @@ osi_StopListener(void)
- p = pfind(rxk_ListenerPid);
- if (p) {
- afs_warn("osi_StopListener: rxk_ListenerPid %u\n", rxk_ListenerPid);
-+#if (__FreeBSD_version >= 900044)
-+ kern_psignal(p, SIGUSR1);
-+#else
- psignal(p, SIGUSR1);
-+#endif
- PROC_UNLOCK(p);
- } else
- afs_warn("osi_StopListener: rxk_Listener not found (pid %u)\n",
diff --git a/net/openafs/files/patch-src__tbudb__Makefile.in b/net/openafs/files/patch-src__tbudb__Makefile.in
new file mode 100644
index 000000000000..37c06474eb2f
--- /dev/null
+++ b/net/openafs/files/patch-src__tbudb__Makefile.in
@@ -0,0 +1,14 @@
+--- openafs-1.6.1/src/tbudb/Makefile.in.orig 2012-03-27 08:03:34.000000000 +0900
++++ openafs-1.6.1/src/tbudb/Makefile.in 2012-06-24 06:44:51.000000000 +0900
+@@ -62,8 +62,9 @@
+ #
+ budb_errs.o: budb_errs.c budb_client.h budb_errs.h
+
+-budb_errs.c budb_client.h: ${BUDB}/budb_errs.et ${BUDB}/budb_client.p.h
+- $(RM) -f budb_client.h budb_errs.c; ${COMPILE_ET} -p ${srcdir}/${BUDB} budb_errs -h budb_client
++budb_errs.c budb_client.h: budb_errs.h ${BUDB}/budb_errs.et ${BUDB}/budb_client.p.h
++ $(RM) -f budb_client.h budb_errs.c
++ ${COMPILE_ET} -p ${srcdir}/${BUDB} budb_errs -h budb_client
+
+ budb_errs.h: ${BUDB}/budb_errs.et
+ ${COMPILE_ET} -p ${srcdir}/${BUDB} budb_errs
diff --git a/net/openafs/files/patch-src__volser__Makefile.in b/net/openafs/files/patch-src__volser__Makefile.in
new file mode 100644
index 000000000000..28c58b3e827c
--- /dev/null
+++ b/net/openafs/files/patch-src__volser__Makefile.in
@@ -0,0 +1,31 @@
+--- openafs-1.6.1/src/volser/Makefile.in.orig 2012-03-27 08:03:34.000000000 +0900
++++ openafs-1.6.1/src/volser/Makefile.in 2012-06-24 09:14:53.000000000 +0900
+@@ -15,7 +15,7 @@
+
+
+ VINCLS=${TOP_INCDIR}/afs/partition.h ${TOP_INCDIR}/afs/volume.h \
+- ${TOP_INCDIR}/afs/vlserver.h vol.h dump.h volser.h lockdata.h \
++ ${TOP_INCDIR}/afs/vlserver.h vol.h dump.h volser.h volint.h lockdata.h \
+ voltrans_inline.h
+
+ RINCLS=${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
+@@ -85,7 +85,7 @@
+ ${TOP_LIBDIR}/libvolser.a: libvolser.a
+ ${INSTALL_DATA} $? $@
+
+-restorevol: restorevol.c
++restorevol: restorevol.c volint.h
+ ${CC} ${CFLAGS} -o restorevol ${srcdir}/restorevol.c \
+ ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBS}
+
+@@ -135,8 +135,9 @@
+ vsutils.o: vsutils.c ${VINCLS} ${RINCLS} ${INTINCLS}
+ volmain.o: volmain.c ${VINCLS} ${RINCLS} ${INTINCLS} AFS_component_version_number.c
+ volprocs.o: volprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
++voltrans.o: voltrans.c ${VINCLS}
+ dumpstuff.o: dumpstuff.c ${VINCLS} ${RINCLS} ${INTINCLS}
+-voldump.o: voldump.c ${VINCLS} ${RINCLS}
++vol-dump.o: vol-dump.c ${VINCLS} ${RINCLS}
+ vos.o: vos.c ${VINCLS} ${RINCLS} ${INTINCLS} AFS_component_version_number.c
+ vsprocs.o: vsprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
+ physio.o: physio.c ${VINCLS}
diff --git a/net/openafs/pkg-plist b/net/openafs/pkg-plist
index 5f46340e5527..fa7ec048be1a 100644
--- a/net/openafs/pkg-plist
+++ b/net/openafs/pkg-plist
@@ -27,6 +27,7 @@ bin/restorevol
bin/klog.krb5
bin/asetkey
bin/aklog
+bin/afsio
include/openafs/afs/param.h
include/openafs/afs/stds.h
include/openafs/afs/afs_sysnames.h
@@ -54,6 +55,7 @@ include/openafs/afs/com_err.h
include/openafs/afs/error_table.h
include/openafs/afs/mit-sipb-cr.h
include/openafs/afs/afs.h
+include/openafs/afs/afscp.h
include/openafs/afs/osi_inode.h
include/openafs/afs/afs_stats.h
include/openafs/afs/exporter.h
@@ -206,6 +208,7 @@ lib/libafsauthent.a
lib/libuafs.a
lib/libubik.a
lib/libafsrpc.a
+lib/libafscp.a
lib/pam_afs.krb.so.1
lib/libjuafs.a
lib/pam_afs.so.1