Skip to content

Commit

Permalink
emulators/open-vm-tools: Fix build on current
Browse files Browse the repository at this point in the history
After src commit 66c5fbca7719dca1ac361a010fa511a4514a662d, insmntque1()
changed to have only 2 arguments, breaking open-vm-tools.

Added a patch to call the new version on recent current and call
destructor to make sure it runs.

Suggested by:	kib
Sponsored by:	Rubicon Communications, LLC ("Netgate")
  • Loading branch information
rbgarga committed Feb 4, 2022
1 parent 6d353fa commit 491b15a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion emulators/open-vm-tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= open-vm-tools
PORTVERSION= 11.3.5
PORTREVISION= 1
PORTREVISION= 2
DISTVERSIONPREFIX= stable-
PORTEPOCH= 2
CATEGORIES= emulators
Expand Down
17 changes: 17 additions & 0 deletions emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_subr.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--- modules/freebsd/vmblock/subr.c.orig 2022-02-04 12:59:09 UTC
+++ modules/freebsd/vmblock/subr.c
@@ -392,7 +392,13 @@ VMBlockNodeGet(struct mount *mp, // IN: VMBlock
}

/* Before FreeBSD 7, insmntque was called by getnewvnode. */
-#if __FreeBSD_version >= 700055
+#if __FreeBSD_version >= 1400051
+ error = insmntque1(vp, mp);
+ if (error != 0) {
+ VMBlockInsMntQueDtr(vp, xp);
+ return error;
+ }
+#else
error = insmntque1(vp, mp, VMBlockInsMntQueDtr, xp);
if (error != 0) {
return error;

0 comments on commit 491b15a

Please sign in to comment.