aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2008-07-09 00:03:48 +0800
committermbr <mbr@FreeBSD.org>2008-07-09 00:03:48 +0800
commita6754e3674e061a02e3bf6f6e62d34212d0ad5eb (patch)
tree00e25872844aa6634e338ea6e11e9a54878e9b43 /emulators
parente92f582a7776bb47fa26366338081837636aa370 (diff)
downloadfreebsd-ports-gnome-a6754e3674e061a02e3bf6f6e62d34212d0ad5eb.tar.gz
freebsd-ports-gnome-a6754e3674e061a02e3bf6f6e62d34212d0ad5eb.tar.zst
freebsd-ports-gnome-a6754e3674e061a02e3bf6f6e62d34212d0ad5eb.zip
Upgrade to build 102166, 2008.07.01
Diffstat (limited to 'emulators')
-rw-r--r--emulators/open-vm-tools/distinfo6
-rw-r--r--emulators/open-vm-tools/files/optpatch-nox1111
-rw-r--r--emulators/open-vm-tools/files/patch-asm49
-rw-r--r--emulators/open-vm-tools/files/patch-cpus30
-rw-r--r--emulators/open-vm-tools/files/patch-freebsd7170
-rw-r--r--emulators/open-vm-tools/files/patch-freebsd8295
-rw-r--r--emulators/open-vm-tools/files/patch-guestApp.c11
-rw-r--r--emulators/open-vm-tools/files/patch-header11
-rw-r--r--emulators/open-vm-tools/files/patch-hgfsmounter-Makefile58
-rw-r--r--emulators/open-vm-tools/files/patch-modules-Makefile63
-rw-r--r--emulators/open-vm-tools/files/patch-toolbox-Makefile22
-rw-r--r--emulators/open-vm-tools/files/patch-vmblock-vfsops.c11
-rw-r--r--emulators/open-vm-tools/files/patch-wiperPosix.c32
-rw-r--r--emulators/open-vm-tools/pkg-plist2
-rw-r--r--emulators/open-vm-tools/pkg-plist-x112
15 files changed, 202 insertions, 571 deletions
diff --git a/emulators/open-vm-tools/distinfo b/emulators/open-vm-tools/distinfo
index f7ecd5282395..994a317e7bbd 100644
--- a/emulators/open-vm-tools/distinfo
+++ b/emulators/open-vm-tools/distinfo
@@ -1,3 +1,3 @@
-MD5 (open-vm-tools-2008.05.02-90473.tar.gz) = 7403eda03ec6822645669bd56936af34
-SHA256 (open-vm-tools-2008.05.02-90473.tar.gz) = 420ec120ecc8aee84a9ff49b175ae28dd87c0a2c809d028a00ad4d2ccd297940
-SIZE (open-vm-tools-2008.05.02-90473.tar.gz) = 2464904
+MD5 (open-vm-tools-2008.07.01-102166.tar.gz) = c33bf4cab7d2d22b0c6a8f03f076fe64
+SHA256 (open-vm-tools-2008.07.01-102166.tar.gz) = 51293ff716bff35ecd03e8747280280be0a748e9fc5ec7c2d02d936b0c86d1c5
+SIZE (open-vm-tools-2008.07.01-102166.tar.gz) = 2558112
diff --git a/emulators/open-vm-tools/files/optpatch-nox11 b/emulators/open-vm-tools/files/optpatch-nox11
new file mode 100644
index 000000000000..76481c6f5e4b
--- /dev/null
+++ b/emulators/open-vm-tools/files/optpatch-nox11
@@ -0,0 +1,11 @@
+--- lib/guestApp/Makefile.in 2008-07-08 16:58:54.000000000 +0200
++++ lib/guestApp/Makefile.in 2008-07-02 00:31:31.000000000 +0200
+@@ -231,7 +231,7 @@
+ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-noinst_LIBRARIES = libGuestApp.a libGuestAppX11.a
++noinst_LIBRARIES = libGuestApp.a #libGuestAppX11.a
+ libGuestApp_a_SOURCES = guestApp.c guestAppPosix.c
+ libGuestAppX11_a_SOURCES = $(libGuestApp_a_SOURCES) guestAppPosixX11.c
+ libGuestAppX11_a_CPPFLAGS = -DGUESTAPP_HAS_X11
diff --git a/emulators/open-vm-tools/files/patch-asm b/emulators/open-vm-tools/files/patch-asm
deleted file mode 100644
index 0b264af250e3..000000000000
--- a/emulators/open-vm-tools/files/patch-asm
+++ /dev/null
@@ -1,49 +0,0 @@
---- modules/freebsd/vmhgfs/vm_basic_asm_x86.h.orig 2008-03-19 08:49:45.000000000 +0100
-+++ modules/freebsd/vmhgfs/vm_basic_asm_x86.h 2008-03-27 17:40:38.000000000 +0100
-@@ -306,7 +306,7 @@
- * smart enough, at least in the version we are currently using.
- */
- if (shift < 32) {
-- asm("mov %%eax, %2 \n\t" // Save lo(multiplicand) in tmp2
-+ __asm("mov %%eax, %2 \n\t" // Save lo(multiplicand) in tmp2
- "mov %%edx, %%eax \n\t" // Get hi(multiplicand)
- "mull %4 \n\t" // p2 = hi(multiplicand) * multiplier
- "xchg %%eax, %2 \n\t" // Save lo(p2) in tmp2, get lo(multiplicand)
-@@ -325,7 +325,7 @@
- : "cc"
- );
- } else {
-- asm("mov %%edx, %2 \n\t" // Save hi(multiplicand) in tmp2
-+ __asm("mov %%edx, %2 \n\t" // Save hi(multiplicand) in tmp2
- "mull %4 \n\t" // p1 = lo(multiplicand) * multiplier
- "mov %%edx, %1 \n\t" // Save hi(p1) in tmp1
- "mov %2, %%eax \n\t" // Discard lo(p1), get hi(multiplicand)
-@@ -421,7 +421,7 @@
-
- /* Written and tested by mann, checked by dbudko and hpreg */
- /* XXX hpreg suggested some improvements that we haven't converged on yet */
-- asm("mov %%eax, %2\n\t" // Save lo(multiplicand)
-+ __asm("mov %%eax, %2\n\t" // Save lo(multiplicand)
- "mov %%edx, %%eax\n\t" // Get hi(multiplicand)
- "test %%eax, %%eax\n\t" // Check sign of multiplicand
- "jl 0f\n\t" // Go if negative
---- modules/freebsd/vmhgfs/vm_basic_asm_x86_64.h.orig 2008-05-15 19:25:31.000000000 +0200
-+++ modules/freebsd/vmhgfs/vm_basic_asm_x86_64.h 2008-05-15 19:25:52.000000000 +0200
-@@ -162,7 +162,7 @@
- uint64 result, dummy;
- const uint64 multiplier64 = multiplier;
-
-- asm("mulq %3 \n\t"
-+ __asm("mulq %3 \n\t"
- "shrdq %1, %0 \n\t"
- : "=a" (result),
- "=d" (dummy)
-@@ -221,7 +221,7 @@
- int64 result, dummy;
- const int64 multiplier64 = multiplier;
-
-- asm("imulq %3 \n\t"
-+ __asm("imulq %3 \n\t"
- "shrdq %1, %0 \n\t"
- : "=a" (result),
- "=d" (dummy)
diff --git a/emulators/open-vm-tools/files/patch-cpus b/emulators/open-vm-tools/files/patch-cpus
deleted file mode 100644
index 4fbb6ca6fb9a..000000000000
--- a/emulators/open-vm-tools/files/patch-cpus
+++ /dev/null
@@ -1,30 +0,0 @@
---- lib/user/hostinfoPosix.c.orig 2008-03-19 08:49:50.000000000 +0100
-+++ lib/user/hostinfoPosix.c 2008-03-27 17:40:38.000000000 +0100
-@@ -68,6 +68,11 @@
- #endif
- #endif
-
-+#if defined(__FreeBSD__)
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+#endif
-+
- #include "vmware.h"
- #include "hostType.h"
- #include "hostinfo.h"
-@@ -674,6 +679,15 @@
- }
-
- return out;
-+#elseif (defined(__FreeBSD__)
-+ uint32 out;
-+ size_t outSize = sizeof out;
-+
-+ if (sysctlbyname("kern.smp.cpus", &out, &outSize, NULL, 0) == -1) {
-+ return -1;
-+ }
-+
-+ return out;
- #else
- static int count = 0;
-
diff --git a/emulators/open-vm-tools/files/patch-freebsd7 b/emulators/open-vm-tools/files/patch-freebsd7
deleted file mode 100644
index bbb6b630533f..000000000000
--- a/emulators/open-vm-tools/files/patch-freebsd7
+++ /dev/null
@@ -1,170 +0,0 @@
---- hgfsmounter/hgfsmounter.c.orig 2008-03-19 08:49:53.000000000 +0100
-+++ hgfsmounter/hgfsmounter.c 2008-03-27 18:28:03.000000000 +0100
-@@ -44,7 +44,9 @@
- # define MS_SYNCHRONOUS MNT_SYNCHRONOUS
- # define MS_NOEXEC MNT_NOEXEC
- # define MS_NOSUID MNT_NOSUID
-+#if __FreeBSD_version < 700000
- # define MS_NODEV MNT_NODEV
-+#endif
- # define MS_UNION MNT_UNION
- # define MS_ASYNC MNT_ASYNC
- # define MS_SUIDDIR MNT_SUIDDIR
-@@ -199,8 +201,10 @@
- printf(" rw mount read-write (default)\n");
- printf(" nosuid ignore suid/sgid bits\n");
- printf(" suid allow suid/sgid bits (default)\n");
-+#if __FreeBSD_version < 700000
- printf(" nodev prevent device node access\n");
- printf(" dev allow device node access (default)\n");
-+#endif
- printf(" noexec prevent program execution\n");
- printf(" exec allow program execution (default)\n");
- printf(" sync file writes are synchronous\n");
-@@ -603,12 +607,14 @@
- } else if (strcmp(key, "suid") == 0) {
- *flags &= ~MS_NOSUID;
- LOG("Setting mount option for allowing suid/sgid bits on\n");
-+#if __FreeBSD_version < 700000
- } else if (strcmp(key, "nodev") == 0) { // allow access to device nodes?
- *flags |= MS_NODEV;
- LOG("Setting mount option for accessing device nodes off\n");
- } else if (strcmp(key, "dev") == 0) {
- *flags &= ~MS_NODEV;
- LOG("Setting mount option for accessing device nodes on\n");
-+#endif
- } else if (strcmp(key, "noexec") == 0) { // allow program execution?
- *flags |= MS_NOEXEC;
- LOG("Setting mount option for program execution off\n");
---- modules/freebsd/vmxnet/if_vxn.c.orig 2008-03-19 08:49:47.000000000 +0100
-+++ modules/freebsd/vmxnet/if_vxn.c 2008-03-27 18:33:12.000000000 +0100
-@@ -299,11 +302,20 @@
- }
- #ifdef VXN_MPSAFE
- error = bus_setup_intr(dev, sc->vxn_irq, INTR_TYPE_NET | INTR_MPSAFE,
-+#if __FreeBSD_version >= 700000
-+ NULL, vxn_intr, sc, &sc->vxn_intrhand);
-+#else
- vxn_intr, sc, &sc->vxn_intrhand);
-+#endif
- #else
- error = bus_setup_intr(dev, sc->vxn_irq, INTR_TYPE_NET,
-+#if __FreeBSD_version >= 700000
-+ NULL, vxn_intr, sc, &sc->vxn_intrhand);
-+#else
- vxn_intr, sc, &sc->vxn_intrhand);
- #endif
-+
-+#endif
- if (error) {
- printf("vxn%d: couldn't set up irq\n", unit);
- error = ENXIO;
---- modules/freebsd/vmhgfs/vnops.c.orig 2008-03-19 08:49:45.000000000 +0100
-+++ modules/freebsd/vmhgfs/vnops.c 2008-03-27 18:34:58.000000000 +0100
-@@ -138,7 +138,9 @@
- .vop_islocked = vop_stdislocked,
- .vop_kqfilter = vop_stdkqfilter,
- .vop_lease = VOP_NULL,
-+#if __FreeBSD_version < 700000
- .vop_lock = vop_stdlock,
-+#endif
- .vop_pathconf = VOP_EINVAL,
- .vop_poll = vop_nopoll,
- .vop_putpages = vop_stdputpages,
---- modules/freebsd/vmblock/vnops.c.orig 2008-03-19 08:49:43.000000000 +0100
-+++ modules/freebsd/vmblock/vnops.c 2008-03-27 18:43:03.000000000 +0100
-@@ -187,6 +187,9 @@
- #include <sys/file.h>
- #include <sys/filedesc.h>
- #include <sys/kdb.h>
-+#if __FreeBSD_version >= 700000
-+#include <sys/priv.h>
-+#endif
-
- #include "vmblock_k.h"
- #include "vmblock.h"
-@@ -210,13 +213,18 @@
- static vop_inactive_t VMBlockVopInactive;
- static vop_ioctl_t VMBlockVopIoctl;
- static vop_islocked_t VMBlockVopIsLocked;
-+#if __FreeBSD_version < 700000
- static vop_lock_t VMBlockVopLock;
-+#endif
- static vop_lookup_t VMBlockVopLookup;
- static vop_open_t VMBlockVopOpen;
- static vop_print_t VMBlockVopPrint;
- static vop_reclaim_t VMBlockVopReclaim;
- static vop_rename_t VMBlockVopRename;
- static vop_setattr_t VMBlockVopSetAttr;
-+#if __FreeBSD_version >= 700000
-+static vop_lock1_t VMBlockVopLock;
-+#endif
- static vop_unlock_t VMBlockVopUnlock;
-
-
-@@ -254,7 +262,9 @@
- .vop_inactive = VMBlockVopInactive,
- .vop_ioctl = VMBlockVopIoctl,
- .vop_islocked = VMBlockVopIsLocked,
-+#if __FreeBSD_version < 700000
- .vop_lock = VMBlockVopLock,
-+#endif
- .vop_lookup = VMBlockVopLookup,
- .vop_open = VMBlockVopOpen,
- .vop_print = VMBlockVopPrint,
-@@ -262,6 +272,9 @@
- .vop_rename = VMBlockVopRename,
- .vop_setattr = VMBlockVopSetAttr,
- .vop_strategy = VOP_EOPNOTSUPP,
-+#if __FreeBSD_version >= 700000
-+ .vop_lock1 = VMBlockVopLock,
-+#endif
- .vop_unlock = VMBlockVopUnlock,
- };
-
-@@ -720,7 +733,11 @@
- * readdir() of the filesystem root for non-privileged users.
- */
- if ((retval = suser(ap->a_td)) == 0) {
-+#if __FreeBSD_version >= 700000
-+ fp = ap->a_fp;
-+#else
- fp = ap->a_td->td_proc->p_fd->fd_ofiles[ap->a_fdidx];
-+#endif
- fp->f_ops = &VMBlockFileOps;
- }
- } else {
-@@ -1100,7 +1117,11 @@
- */
-
- static int
-+#if __FreeBSD_version >= 700000
-+VMBlockVopLock(struct vop_lock1_args *ap)
-+#else
- VMBlockVopLock(struct vop_lock_args *ap)
-+#endif
- /*
- struct vop_lock_args {
- struct vnode *vp; // IN: vnode operand
---- modules/freebsd/vmhgfs/vfsops.c.orig 2008-03-19 08:49:45.000000000 +0100
-+++ modules/freebsd/vmhgfs/vfsops.c 2008-03-27 19:04:20.000000000 +0100
-@@ -29,6 +29,9 @@
- #include <sys/malloc.h>
- #include <sys/kernel.h>
- #include <sys/systm.h>
-+#if __FreeBSD_version >= 700000
-+#include <sys/priv.h>
-+#endif
-
- #include "hgfs_kernel.h"
- #include "request.h"
-@@ -64,7 +67,9 @@
- .vfs_vget = vfs_stdvget,
- .vfs_fhtovp = vfs_stdfhtovp,
- .vfs_checkexp = vfs_stdcheckexp,
-+#if __FreeBSD_version < 700000
- .vfs_vptofh = vfs_stdvptofh,
-+#endif
- .vfs_init = HgfsVfsInit,
- .vfs_uninit = HgfsVfsUninit,
- .vfs_extattrctl = vfs_stdextattrctl,
diff --git a/emulators/open-vm-tools/files/patch-freebsd8 b/emulators/open-vm-tools/files/patch-freebsd8
deleted file mode 100644
index e690741644cd..000000000000
--- a/emulators/open-vm-tools/files/patch-freebsd8
+++ /dev/null
@@ -1,295 +0,0 @@
---- modules/freebsd/vmblock/vfsops.c 2008-03-31 12:17:24.000000000 +0200
-+++ modules/freebsd/vmblock/vfsops.c 2008-03-31 12:28:18.000000000 +0200
-@@ -187,7 +187,11 @@
- * Make sure the node alias worked
- */
- if (error) {
-- VOP_UNLOCK(vp, 0, td);
-+#if __FreeBSD_version > 800001
-+ VOP_UNLOCK(vp, 0);
-+#else
-+ VOP_UNLOCK(vp, 0,td);
-+#endif
- vrele(lowerrootvp);
- free(xmp, M_VMBLOCKFSMNT); /* XXX */
- return error;
-@@ -209,7 +213,11 @@
- /*
- * Unlock the node (either the lower or the alias)
- */
-- VOP_UNLOCK(vp, 0, td);
-+#if __FreeBSD_version > 800001
-+ VOP_UNLOCK(vp, 0);
-+#else
-+ VOP_UNLOCK(vp, 0,td);
-+#endif
-
- /*
- * If the staging area is a local filesystem, reflect that here, too. (We
-@@ -288,14 +296,22 @@
- * transfer will happen atomically. (Er, at least within the scope of
- * the vnode subsystem.)
- */
-+#if __FreeBSD_version > 800001
-+ VOP_LOCK(vp, LK_EXCLUSIVE|LK_RETRY|LK_INTERLOCK);
-+#else
- VOP_LOCK(vp, LK_EXCLUSIVE|LK_RETRY|LK_INTERLOCK, td);
-+#endif
-
- removed = BlockRemoveAllBlocks(OS_UNKNOWN_BLOCKER);
-
- VI_LOCK(vp);
- vp->v_usecount -= removed;
- VI_UNLOCK(vp);
-+#if __FreeBSD_version > 800001
-+ VOP_UNLOCK(vp, 0);
-+#else
- VOP_UNLOCK(vp, 0, td);
-+#endif
-
- if (mntflags & MNT_FORCE) {
- flags |= FORCECLOSE;
-@@ -346,7 +362,11 @@
- */
- vp = MNTTOVMBLOCKMNT(mp)->rootVnode;
- VREF(vp);
-+#if __FreeBSD_version > 800001
-+ vn_lock(vp, flags | LK_RETRY);
-+#else
- vn_lock(vp, flags | LK_RETRY, td);
-+#endif
- *vpp = vp;
- return 0;
- }
---- modules/freebsd/vmhgfs/os.c 2008-03-19 08:49:45.000000000 +0100
-+++ modules/freebsd/vmhgfs/os.c 2008-03-31 12:08:34.000000000 +0200
-@@ -38,6 +38,13 @@
- #include "os.h"
- #include "debug.h"
-
-+#if __FreeBSD_version > 800001
-+#define kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr) \
-+ kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr)
-+#define kthread_exit(int) \
-+ kproc_exit(int)
-+#endif
-+
- /*
- * Malloc tag for statistics, debugging, etc.
- */
---- modules/freebsd/vmhgfs/state.c 2008-03-19 08:49:45.000000000 +0100
-+++ modules/freebsd/vmhgfs/state.c 2008-03-31 12:40:21.000000000 +0200
-@@ -1064,7 +1064,11 @@
- /*
- * Return a locked vnode to the caller.
- */
-+#if __FreeBSD_version > 800001
-+ lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL);
-+#else
- lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL, curthread);
-+#endif
-
- /*
- * Now we'll initialize the vnode. We need to set the file type, vnode
---- modules/freebsd/vmhgfs/vfsops.c 2008-03-31 12:17:24.000000000 +0200
-+++ modules/freebsd/vmhgfs/vfsops.c 2008-03-31 12:40:50.000000000 +0200
-@@ -169,7 +169,11 @@
- sip->rootVnode = vp;
-
- /* We're finished with the root vnode, so unlock it. */
-+#if __FreeBSD_version > 800001
-+ VOP_UNLOCK(vp, 0);
-+#else
- VOP_UNLOCK(vp, 0, td);
-+#endif
-
- /*
- * Initialize this file system's Hgfs requests container.
---- modules/freebsd/vmblock/vnops.c.orig 2008-03-31 14:39:16.000000000 +0200
-+++ modules/freebsd/vmblock/vnops.c 2008-03-31 14:42:46.000000000 +0200
-@@ -573,7 +573,9 @@
- */
- {
- struct componentname *cnp = ap->a_cnp;
-+#if __FreeBSD_version <= 800001
- struct thread *td = cnp->cn_thread;
-+#endif
- struct vnode *dvp = ap->a_dvp;
- struct vnode *vp, *ldvp, *lvp;
- BlockHandle blockCookie;
-@@ -612,15 +614,27 @@
- }
-
- if ((blockCookie = BlockLookup(pathname, OS_UNKNOWN_BLOCKER)) != NULL) {
-+#if __FreeBSD_version > 800001
-+ int lkflags = lockstatus(dvp->v_vnlock) & LK_TYPE_MASK;
-+#else
- int lkflags = lockstatus(dvp->v_vnlock, td) & LK_TYPE_MASK;
-+#endif
- lvp = VPTOVMB(dvp)->lowerVnode;
- vhold(dvp);
- vhold(lvp);
-+#if __FreeBSD_version > 800001
-+ VOP_UNLOCK(dvp, 0);
-+#else
- VOP_UNLOCK(dvp, 0, td);
-+#endif
-
- error = BlockWaitOnFile(pathname, blockCookie);
-
-- VOP_LOCK(dvp, lkflags, td);
-+#if __FreeBSD_version > 800001
-+ VOP_LOCK(dvp, lkflags);
-+#else
-+ VOP_UNLOCK(dvp, lkflags, td);
-+#endif
- vdrop(lvp);
- vdrop(dvp);
- if (dvp->v_op != &VMBlockVnodeOps) {
-@@ -835,7 +849,9 @@
- {
- VMBlockIoctlArgs *ioctlArgs = (VMBlockIoctlArgs *)ap->a_data;
- VMBlockMount *mp;
-+#if __FreeBSD_version <= 800001
- struct thread *td = ap->a_td;
-+#endif
- struct vnode *vp = ap->a_vp;
- char *pathbuf = NULL;
- int ret = 0, pathlen;
-@@ -850,10 +866,18 @@
- * may be invalid.
- * 2. Make sure the filesystem isn't being unmounted.
- */
-+#if __FreeBSD_version > 800001
-+ VOP_LOCK(vp, LK_EXCLUSIVE|LK_RETRY);
-+#else
- VOP_LOCK(vp, LK_EXCLUSIVE|LK_RETRY, td);
-+#endif
- if (vp->v_op != &VMBlockVnodeOps ||
- vp->v_mount->mnt_kern_flag & MNTK_UNMOUNT) {
-+#if __FreeBSD_version > 800001
-+ VOP_UNLOCK(vp, 0);
-+#else
- VOP_UNLOCK(vp, 0, td);
-+#endif
- return EBADF;
- }
-
-@@ -870,7 +894,11 @@
- * argument before passing to the lower layer.
- */
- ap->a_data = ioctlArgs->data;
-+#if __FreeBSD_version > 800001
-+ VOP_UNLOCK(vp, 0);
-+#else
- VOP_UNLOCK(vp, 0, td);
-+#endif
- return VMBlockVopBypass((struct vop_generic_args *)ap);
- }
-
-@@ -938,7 +966,11 @@
- ret = EOPNOTSUPP;
- }
-
-+#if __FreeBSD_version > 800001
-+ VOP_UNLOCK(vp, 0);
-+#else
- VOP_UNLOCK(vp, 0, td);
-+#endif
- if (pathbuf) {
- uma_zfree(VMBlockPathnameZone, pathbuf);
- }
-@@ -1132,7 +1164,9 @@
- {
- struct vnode *vp = ap->a_vp;
- int flags = ap->a_flags;
-+#if __FreeBSD_version <= 800001
- struct thread *td = ap->a_td;
-+#endif
- struct VMBlockNode *nn;
- struct vnode *lvp;
- int error;
-@@ -1160,7 +1194,11 @@
- * We prevent it from being recycled by holding the vnode here.
- */
- vholdl(lvp);
-+#if __FreeBSD_version > 800001
-+ error = VOP_LOCK(lvp, flags);
-+#else
- error = VOP_LOCK(lvp, flags, td);
-+#endif
-
- /*
- * We might have slept to get the lock and someone might have clean
-@@ -1182,7 +1220,11 @@
- panic("Unsupported lock request %d\n",
- ap->a_flags);
- }
-+#if __FreeBSD_version > 800001
-+ VOP_UNLOCK(lvp, 0);
-+#else
- VOP_UNLOCK(lvp, 0, td);
-+#endif
- error = vop_stdlock(ap);
- }
- vdrop(lvp);
-@@ -1226,7 +1268,9 @@
- {
- struct vnode *vp = ap->a_vp;
- int flags = ap->a_flags;
-+#if __FreeBSD_version <= 800001
- struct thread *td = ap->a_td;
-+#endif
- struct VMBlockNode *nn;
- struct vnode *lvp;
- int error;
-@@ -1241,7 +1285,11 @@
- }
- nn = VPTOVMB(vp);
- if (nn != NULL && (lvp = VMBVPTOLOWERVP(vp)) != NULL) {
-+#if __FreeBSD_version > 800001
-+ error = VOP_UNLOCK(lvp, flags);
-+#else
- error = VOP_UNLOCK(lvp, flags, td);
-+#endif
- } else {
- error = vop_stdunlock(ap);
- }
-@@ -1276,9 +1324,15 @@
- */
- {
- struct vnode *vp = ap->a_vp;
-+#if __FreeBSD_version <= 800001
- struct thread *td = ap->a_td;
-
- return lockstatus(vp->v_vnlock, td);
-+#else
-+
-+ return lockstatus(vp->v_vnlock);
-+#endif
-+
- }
-
-
-@@ -1392,7 +1446,11 @@
- * to the lower layer's lock.)
- */
- vp->v_vnlock = &vp->v_lock;
-+#if __FreeBSD_version > 800001
-+ lockmgr(vp->v_vnlock, LK_EXCLUSIVE|LK_INTERLOCK, VI_MTX(vp));
-+#else
- lockmgr(vp->v_vnlock, LK_EXCLUSIVE|LK_INTERLOCK, VI_MTX(vp), curthread);
-+#endif
- vput(lowervp);
-
- /*
---- modules/freebsd/vmblock/vfsops.c.orig 2008-03-31 15:25:38.000000000 +0200
-+++ modules/freebsd/vmblock/vfsops.c 2008-03-31 15:30:09.000000000 +0200
-@@ -52,6 +52,7 @@
- #include <sys/lock.h>
- #include <sys/malloc.h>
- #include <sys/mount.h>
-+#include <sys/fcntl.h>
- #include <sys/namei.h>
- #include <sys/proc.h>
- #include <sys/vnode.h>
diff --git a/emulators/open-vm-tools/files/patch-guestApp.c b/emulators/open-vm-tools/files/patch-guestApp.c
new file mode 100644
index 000000000000..9d93e01a07a0
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-guestApp.c
@@ -0,0 +1,11 @@
+--- lib/guestApp/guestApp.c.orig 2008-05-29 10:42:37.000000000 +0300
++++ lib/guestApp/guestApp.c 2008-05-29 10:43:09.000000000 +0300
+@@ -77,7 +77,7 @@
+ #elif defined(_WIN32)
+ #define GUESTAPP_TOOLS_INSTALL_PATH ""
+ #else
+-#define GUESTAPP_TOOLS_INSTALL_PATH "/etc/vmware-tools"
++#define GUESTAPP_TOOLS_INSTALL_PATH "/usr/local/share/vmware-tools"
+ #endif
+
+ /*
diff --git a/emulators/open-vm-tools/files/patch-header b/emulators/open-vm-tools/files/patch-header
deleted file mode 100644
index 01559ed80a1d..000000000000
--- a/emulators/open-vm-tools/files/patch-header
+++ /dev/null
@@ -1,11 +0,0 @@
---- modules/freebsd/vmhgfs/os.h.orig 2008-03-19 08:49:45.000000000 +0100
-+++ modules/freebsd/vmhgfs/os.h 2008-03-27 17:40:38.000000000 +0100
-@@ -29,6 +29,8 @@
-
- #if defined(__FreeBSD__)
- # include <sys/param.h> // for <everything>
-+# include <sys/proc.h>
-+# include <sys/condvar.h>
- # include <sys/lock.h> // for struct mtx
- # include <sys/mutex.h> // for struct mtx
- # include <sys/sx.h>
diff --git a/emulators/open-vm-tools/files/patch-hgfsmounter-Makefile b/emulators/open-vm-tools/files/patch-hgfsmounter-Makefile
new file mode 100644
index 000000000000..86ce99503757
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-hgfsmounter-Makefile
@@ -0,0 +1,58 @@
+--- hgfsmounter/Makefile.am.orig 2008-07-02 00:31:20.000000000 +0200
++++ hgfsmounter/Makefile.am 2008-07-08 15:30:29.000000000 +0200
+@@ -18,8 +18,8 @@
+ sbin_PROGRAMS = mount.vmhgfs
+
+ mount_vmhgfs_LDADD =
+-mount_vmhgfs_LDADD += ../lib/string/libString.a
+ mount_vmhgfs_LDADD += ../lib/strUtil/libStrUtil.a
++mount_vmhgfs_LDADD += ../lib/string/libString.a
+ mount_vmhgfs_LDADD += ../lib/panicDefault/libPanicDefault.a
+ mount_vmhgfs_LDADD += ../lib/panic/libPanic.a
+ mount_vmhgfs_LDADD += ../lib/stubs/libStubs.a
+@@ -30,11 +30,11 @@
+
+ if FREEBSD
+ install-exec-hook:
+- $(MV) $(sbindir)/mount.vmhgfs $(sbindir)/mount_vmhgfs
++ /bin/mv $(sbindir)/mount.vmhgfs $(sbindir)/mount_vmhgfs
+ chown root $(sbindir)/mount_vmhgfs
+ chmod u+s $(sbindir)/mount_vmhgfs
+ uninstall-hook:
+- $(RM) -f $(sbindir)/mount_vmhgfs
++ /bin/rm -f $(sbindir)/mount_vmhgfs
+ else
+ install-exec-hook:
+ chown root $(sbindir)/mount.vmhgfs
+--- hgfsmounter/Makefile.in.orig 2008-07-02 00:31:30.000000000 +0200
++++ hgfsmounter/Makefile.in 2008-07-08 15:29:54.000000000 +0200
+@@ -47,6 +47,7 @@
+ NORMAL_UNINSTALL = :
+ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
++MV=/bin/mv
+ build_triplet = @build@
+ host_triplet = @host@
+ sbin_PROGRAMS = mount.vmhgfs$(EXEEXT)
+@@ -64,8 +65,8 @@
+ am_mount_vmhgfs_OBJECTS = hgfsmounter.$(OBJEXT) \
+ stub-user-util.$(OBJEXT)
+ mount_vmhgfs_OBJECTS = $(am_mount_vmhgfs_OBJECTS)
+-mount_vmhgfs_DEPENDENCIES = ../lib/string/libString.a \
+- ../lib/strUtil/libStrUtil.a \
++mount_vmhgfs_DEPENDENCIES = ../lib/strUtil/libStrUtil.a \
++ ../lib/string/libString.a \
+ ../lib/panicDefault/libPanicDefault.a ../lib/panic/libPanic.a \
+ ../lib/stubs/libStubs.a
+ DEFAULT_INCLUDES = -I.@am__isrc@
+@@ -225,8 +226,8 @@
+ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-mount_vmhgfs_LDADD = ../lib/string/libString.a \
+- ../lib/strUtil/libStrUtil.a \
++mount_vmhgfs_LDADD = ../lib/strUtil/libStrUtil.a \
++ ../lib/string/libString.a \
+ ../lib/panicDefault/libPanicDefault.a ../lib/panic/libPanic.a \
+ ../lib/stubs/libStubs.a
+ mount_vmhgfs_SOURCES = hgfsmounter.c stub-user-util.c
diff --git a/emulators/open-vm-tools/files/patch-modules-Makefile b/emulators/open-vm-tools/files/patch-modules-Makefile
new file mode 100644
index 000000000000..50b8a61e8f56
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-modules-Makefile
@@ -0,0 +1,63 @@
+--- modules/Makefile.am.orig 2008-07-08 14:44:08.000000000 +0200
++++ modules/Makefile.am 2008-07-08 14:45:16.000000000 +0200
+@@ -15,14 +15,6 @@
+ export DEPMOD = depmod -a
+ endif LINUX
+
+-if FREEBSD
+-export vmblockdir = $(MODULES_DIR)
+-export vmhgfsdir = $(MODULES_DIR)
+-export vmmemctldir = $(MODULES_DIR)
+-export vmsyncdir = $(MODULES_DIR)
+-export vmxnetdir = $(MODULES_DIR)
+-endif FREEBSD
+-
+ ## Automake will supplement its own "distclean" and "clean" targets with these.
+ distclean-local:
+ clean-local:
+@@ -32,13 +24,4 @@
+ $(RM) -f $(MODULES_OS)/*.o $(MODULES_OS)/*.ko
+
+ install-exec-hook:
+- for MOD in $(MODULES); do \
+- $(INSTALL) -d `eval echo '$$'$${MOD}dir`; \
+- $(INSTALL) -m644 $(MODULES_OS)/$$MOD/$$MOD.ko `eval echo '$$'$${MOD}dir`; \
+- done
+- eval "$$DEPMOD"
+ uninstall-hook:
+- for MOD in $(MODULES); do \
+- $(RM) -f `eval echo '$$'$${MOD}dir`/$$MOD.ko &> /dev/null; \
+- done
+- eval "$$DEPMOD"
+--- modules/Makefile.in.orig 2008-07-08 14:44:39.000000000 +0200
++++ modules/Makefile.in 2008-07-08 14:45:03.000000000 +0200
+@@ -368,12 +368,6 @@
+ @LINUX_TRUE@export vmxnetdir = $(MODULES_DIR)/drivers/net
+ @LINUX_TRUE@export DEPMOD = depmod -a
+
+-@FREEBSD_TRUE@export vmblockdir = $(MODULES_DIR)
+-@FREEBSD_TRUE@export vmhgfsdir = $(MODULES_DIR)
+-@FREEBSD_TRUE@export vmmemctldir = $(MODULES_DIR)
+-@FREEBSD_TRUE@export vmsyncdir = $(MODULES_DIR)
+-@FREEBSD_TRUE@export vmxnetdir = $(MODULES_DIR)
+-
+ distclean-local:
+ clean-local:
+ for MOD in $(MODULES); do \
+@@ -382,16 +376,7 @@
+ $(RM) -f $(MODULES_OS)/*.o $(MODULES_OS)/*.ko
+
+ install-exec-hook:
+- for MOD in $(MODULES); do \
+- $(INSTALL) -d `eval echo '$$'$${MOD}dir`; \
+- $(INSTALL) -m644 $(MODULES_OS)/$$MOD/$$MOD.ko `eval echo '$$'$${MOD}dir`; \
+- done
+- eval "$$DEPMOD"
+ uninstall-hook:
+- for MOD in $(MODULES); do \
+- $(RM) -f `eval echo '$$'$${MOD}dir`/$$MOD.ko &> /dev/null; \
+- done
+- eval "$$DEPMOD"
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/emulators/open-vm-tools/files/patch-toolbox-Makefile b/emulators/open-vm-tools/files/patch-toolbox-Makefile
new file mode 100644
index 000000000000..ba289e0550d7
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-toolbox-Makefile
@@ -0,0 +1,22 @@
+--- toolbox/Makefile.in.orig 2008-07-08 15:03:02.000000000 +0200
++++ toolbox/Makefile.in 2008-07-08 15:03:49.000000000 +0200
+@@ -551,7 +551,7 @@
+ $(INSTALL) -d $(datadir)/applications/
+ $(INSTALL) -m 644 ../scripts/common/vmware-toolbox.desktop \
+ $(datadir)/applications/
+- $(SED) -i s/Exec=.*/Exec=vmware-toolbox/ \
++ $(SED) -e s/Exec=.*/Exec=vmware-toolbox/ \
+ $(datadir)/applications/vmware-toolbox.desktop
+ $(INSTALL) -d /usr/share/pixmaps/vmware
+ $(INSTALL) -m 644 bigIcon.xpm \
+--- toolbox/Makefile.am.orig 2008-07-08 15:03:10.000000000 +0200
++++ toolbox/Makefile.am 2008-07-08 15:03:56.000000000 +0200
+@@ -65,7 +65,7 @@
+ $(INSTALL) -d $(datadir)/applications/
+ $(INSTALL) -m 644 ../scripts/common/vmware-toolbox.desktop \
+ $(datadir)/applications/
+- $(SED) -i s/Exec=.*/Exec=vmware-toolbox/ \
++ $(SED) -e s/Exec=.*/Exec=vmware-toolbox/ \
+ $(datadir)/applications/vmware-toolbox.desktop
+ $(INSTALL) -d /usr/share/pixmaps/vmware
+ $(INSTALL) -m 644 bigIcon.xpm \
diff --git a/emulators/open-vm-tools/files/patch-vmblock-vfsops.c b/emulators/open-vm-tools/files/patch-vmblock-vfsops.c
deleted file mode 100644
index 9d99158476e8..000000000000
--- a/emulators/open-vm-tools/files/patch-vmblock-vfsops.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- modules/freebsd/vmblock/vfsops.c 2007-11-21 09:10:18.000000000 +0100
-+++ modules/freebsd/vmblock/vfsops.c 2007-12-06 12:26:47.000000000 +0100
-@@ -217,7 +217,7 @@
- */
- MNT_ILOCK(mp);
- mp->mnt_flag |= lowerrootvp->v_mount->mnt_flag & MNT_LOCAL;
--#if BSD_VERSION >= 60
-+#if __FreeBSD_version >= 600000
- mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & MNTK_MPSAFE;
- #endif
- MNT_IUNLOCK(mp);
diff --git a/emulators/open-vm-tools/files/patch-wiperPosix.c b/emulators/open-vm-tools/files/patch-wiperPosix.c
new file mode 100644
index 000000000000..11bf780f80b2
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-wiperPosix.c
@@ -0,0 +1,32 @@
+--- lib/wiper/wiperPosix.c 2008-07-02 00:31:18.000000000 +0200
++++ lib/wiper/wiperPosix.c 2008-07-08 10:22:47.000000000 +0200
+@@ -36,9 +36,9 @@
+ # include <sys/ucred.h>
+ # include <sys/mount.h>
+ # include <fstab.h>
+-# if BSD_VERSION >= 50
++# if __FreeBSD_version >= 500000
+ # include <libgen.h>
+-# endif /* BSD_VERSION < 50 */
++# endif /* __FreeBSD_version < 500000 */
+ #endif
+ #include <unistd.h>
+
+@@ -210,7 +210,7 @@
+ * function, as a whole, does not even apply to OS X, so this caveat is
+ * only minor.
+ */
+-#if BSD_VERSION < 50
++#if __FreeBSD_version < 500000
+ /*
+ * Before FreeBSD 5, device nodes had static major/minor numbers.
+ * (FreeBSD 5 included devfs which got rid of this concept.) So
+@@ -246,7 +246,7 @@
+ retval = TRUE;
+ }
+ }
+-#endif /* BSD_VERSION */
++#endif /* __FreeBSD_version */
+
+ return retval;
+ }
diff --git a/emulators/open-vm-tools/pkg-plist b/emulators/open-vm-tools/pkg-plist
index 2c16bfb77fb2..43b18b6c04ab 100644
--- a/emulators/open-vm-tools/pkg-plist
+++ b/emulators/open-vm-tools/pkg-plist
@@ -13,7 +13,7 @@ share/vmware-tools/resume-vm-default
share/vmware-tools/suspend-vm-default
sbin/vmware-guestd
sbin/vmware-checkvm
-%%FIVEONLY%%sbin/vmware-hgfsmounter
+%%FIVEONLY%%sbin/mount.vmhgfs
sbin/vmware-xferlogs
@dirrm share/vmware-tools
@unexec if test -f %D/lib/vmware-tools/modules/drivers/linker.hints; then rm -f %D/lib/vmware-tools/modules/drivers/linker.hints; fi
diff --git a/emulators/open-vm-tools/pkg-plist-x11 b/emulators/open-vm-tools/pkg-plist-x11
index bf00202c82a0..fa321fb4a80c 100644
--- a/emulators/open-vm-tools/pkg-plist-x11
+++ b/emulators/open-vm-tools/pkg-plist-x11
@@ -13,7 +13,7 @@ share/vmware-tools/resume-vm-default
share/vmware-tools/suspend-vm-default
sbin/vmware-guestd
sbin/vmware-checkvm
-%%FIVEONLY%%sbin/vmware-hgfsmounter
+%%FIVEONLY%%sbin/mount.vmhgfs
sbin/vmware-xferlogs
%%X11%%sbin/vmware-toolbox
%%X11%%sbin/vmware-user