Build fails on 13-CURRENT after base r356432. cc -pipe -fstack-protector-strong -fno-strict-aliasing -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHAS_CLOSEFROM -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_IDEV -DHAS_VM_MEMATTR_T -DNEEDS_DEVICE_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHASFUSEFS -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=13000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR=\"13.0-CURRENT\" -I/usr/src/sys -O2 -c dnode.c -o dnode.o dnode.c:563:9: error: no member named 'v_tag' in 'struct vnode' if (v->v_tag && !kread((KA_T)v->v_tag, (char *)&vtbuf, sizeof(vtbuf))) ~ ^ dnode.c:563:34: error: no member named 'v_tag' in 'struct vnode' if (v->v_tag && !kread((KA_T)v->v_tag, (char *)&vtbuf, sizeof(vtbuf))) ~ ^ 2 errors generated. *** Error code 1 Stop. make[1]: stopped in /usr0/freebsd/ports/work/usr0/freebsd/ports/head/sysutils/lsof/work/lsof-4.93.2 *** Error code 1 Stop. make: stopped in /usr0/freebsd/ports/head/sysutils/lsof yasu@rolling-vm-freebsd1[2022]%
@mjg can you look at this? Thanks.
This will do the trick. @@ -560,7 +560,7 @@ * Get the pseudo vnode tag type for FreeBSD >= 5. */ vtag = VT_UNKNOWN; - if (v->v_tag && !kread((KA_T)v->v_tag, (char *)&vtbuf, sizeof(vtbuf))) + if (!kread((KA_T)v->v_lock.lock_object.lo_name, (char *)&vtbuf, sizeof(vtbuf))) { vtbuf[sizeof(vtbuf) - 1] = '\0'; vtbp = vtbuf;
Will that also work on earlier versions or do I need to make it conditional?
I did not check how far this goes, but should work at least since stuff released after 2005.
So I just checked, this will work at least since FreeBSD 5.0 which also happens to match the version check. iow you can just apply this.
A commit references this bug: Author: ler Date: Fri Jan 10 00:02:33 UTC 2020 New revision: 522545 URL: https://svnweb.freebsd.org/changeset/ports/522545 Log: sysutils/lsof: fix after base r356432. PR: 243172 Submitted by: mjg Reported by: yasu@utahime.org Changes: head/sysutils/lsof/Makefile head/sysutils/lsof/files/patch-dialects_freebsd_dnode.c head/sysutils/lsof/files/patch-dialects_freebsd_dnode2.c
Committed. Thanks!
A commit references this bug: Author: ler Date: Tue Jan 21 16:46:44 UTC 2020 New revision: 523728 URL: https://svnweb.freebsd.org/changeset/ports/523728 Log: MFH: r522273 r522545 r522582 r523727 sysutils/lsof: fix build following base r356337. I took the patch from 243122 as it was more correct. PR: 243122, 243083 Submitted by: cy, yasu@utahime.org sysutils/lsof: fix after base r356432. PR: 243172 Submitted by: mjg Reported by: yasu@utahime.org sysutils/lsof: add a PPC64 work around for needing -lzpool PR: 242833 Submitted by: luciano@vespaperitivo.it sysutils/lsof: fix build on powerpc, powerpc64, powerpcse PR: 242758 Submitted by: pkubaj Approved by: ports-secteam (joneum) Changes: _U branches/2020Q1/ branches/2020Q1/sysutils/lsof/Makefile branches/2020Q1/sysutils/lsof/files/patch-dialects_freebsd_dnode.c branches/2020Q1/sysutils/lsof/files/patch-dialects_freebsd_dnode2.c