ports/174290: [patch] emulators/open-vm-tools: fix compilation after non-MPSAFE deorbit
Garrett Cooper
yanegomi at gmail.com
Sun Dec 9 06:10:00 UTC 2012
>Number: 174290
>Category: ports
>Synopsis: [patch] emulators/open-vm-tools: fix compilation after non-MPSAFE deorbit
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Dec 09 06:10:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Garrett Cooper
>Release: 10-CURRENT
>Organization:
EMC Isilon
>Environment:
n/a
>Description:
emulators/open-vm-tools* doesn't compile after r242833 because the MNTK_MPSAFE #define was removed. The attached patch adds a test for __FreeBSD_version < 1000021 so the code that applies MNTK_MPSAFE is only used for only versions of FreeBSD.
>How-To-Repeat:
Install 1000021+ or later.
cd emulators/open-vm-tools; make all
>Fix:
Patch attached with submission follows:
>From 4bef90c5e5608599a6eb77b5af078496ef81bbe7 Mon Sep 17 00:00:00 2001
From: Garrett Cooper <yanegomi at gmail.com>
Date: Wed, 5 Dec 2012 08:06:22 -0800
Subject: [PATCH] Chase r242833 on CURRENT
Signed-off-by: Garrett Cooper <yanegomi at gmail.com>
---
.../open-vm-tools/files/patch-deorbit-MNTK_MPSAFE | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 emulators/open-vm-tools/files/patch-deorbit-MNTK_MPSAFE
diff --git a/emulators/open-vm-tools/files/patch-deorbit-MNTK_MPSAFE b/emulators/open-vm-tools/files/patch-deorbit-MNTK_MPSAFE
new file mode 100644
index 0000000..5320bd8
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-deorbit-MNTK_MPSAFE
@@ -0,0 +1,23 @@
+--- modules/freebsd/vmblock/vfsops.c 2012-12-05 07:58:12.000000000 -0800
++++ modules/freebsd/vmblock/vfsops.c 2012-12-05 07:58:56.000000000 -0800
+@@ -236,7 +236,7 @@
+ */
+ MNT_ILOCK(mp);
+ mp->mnt_flag |= lowerrootvp->v_mount->mnt_flag & MNT_LOCAL;
+-#if __FreeBSD_version >= 600000
++#if __FreeBSD_version >= 600000 && __FreeBSD_version < 1000021
+ mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & MNTK_MPSAFE;
+ #endif
+ MNT_IUNLOCK(mp);
+--- modules/freebsd/vmhgfs/vfsops.c 2012-12-05 07:57:56.000000000 -0800
++++ modules/freebsd/vmhgfs/vfsops.c 2012-12-05 08:00:43.000000000 -0800
+@@ -201,7 +201,9 @@
+ * structures, not oplocks/leases with the VM's host.)
+ */
+ MNT_ILOCK(mp);
++#if __FreeBSD_version < 1000021
+ mp->mnt_kern_flag |= MNTK_MPSAFE;
++#endif
+ MNT_IUNLOCK(mp);
+
+ /* Get a new unique filesystem ID */
--
1.8.0
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list