Bug 243240

Summary: emulators/open-vm-tools-nox11: fails to build after r356337
Product: Ports & Packages Reporter: Ruslan Garipov <brigadir15>
Component: Individual Port(s)Assignee: Josh Paetzel <jpaetzel>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (jpaetzel)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Remove reference to a_flags field
none
Redefine COMPAT_VOP_UNLOCK none

Description Ruslan Garipov 2020-01-10 09:59:29 UTC
Created attachment 210586 [details]
Remove reference to a_flags field

I'm trying to build emulators/open-vm-tools-nox11 on FreeBSD 13.0-CURRENT r356200 with /usr/src updated to r356537:

# cd /usr/ports/emulators/open-vm-tools-nox11
# make build
...
--- vfsops.o ---
vfsops.c:212:7: error: too many arguments to function call, expected single argument 'vp', have 2 arguments
      COMPAT_VOP_UNLOCK(vp, 0, compat_td);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-stable-11.0.1/open-vm-tools/modules/freebsd/shared/compat_vop.h:50:68: note: expanded from macro 'COMPAT_VOP_UNLOCK'
#define COMPAT_VOP_UNLOCK(vop, flags, threadvar) VOP_UNLOCK((vop), (flags))
                                                 ~~~~~~~~~~        ^~~~~~~
/usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-stable-11.0.1/open-vm-tools/modules/freebsd/vmblock/vnode_if.h:892:1: note: 'VOP_UNLOCK' declared here
static __inline int VOP_UNLOCK(
^
...

This is caused by r356337[1] which dropped flags argument from VOP_UNLOCK.

I've created a simple patch (with `make makepatch` that fixes the issue for me.

[1] https://svnweb.freebsd.org/base?view=revision&revision=356337
Comment 1 Ruslan Garipov 2020-01-10 10:00:29 UTC
Created attachment 210587 [details]
Redefine COMPAT_VOP_UNLOCK

Here is the second part of the patch.
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-01-11 16:33:13 UTC
A commit references this bug:

Author: jpaetzel
Date: Sat Jan 11 16:32:47 UTC 2020
New revision: 522696
URL: https://svnweb.freebsd.org/changeset/ports/522696

Log:
  Fix build on HEAD

  PR:	243240
  Submitted by:	Ruslan Garipov <brigadir15@gmail.com>

Changes:
  head/emulators/open-vm-tools/files/patch-modules_freebsd_shared_compat__vop.h
  head/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vnops.c
Comment 3 Josh Paetzel freebsd_committer freebsd_triage 2020-01-11 16:33:38 UTC
Committed, thanks!