Bug 251266 - [PATCH] sysutils/lsof: fix 13-CURRENT build post r367777
Summary: [PATCH] sysutils/lsof: fix 13-CURRENT build post r367777
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Larry Rosenman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-20 05:22 UTC by Cy Schubert
Modified: 2020-11-21 06:56 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (ler)
cy: maintainer-feedback?


Attachments
Patch for 13-CURRENT after r367777 (2.22 KB, patch)
2020-11-20 05:22 UTC, Cy Schubert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cy Schubert freebsd_committer 2020-11-20 05:22:20 UTC
Created attachment 219825 [details]
Patch for 13-CURRENT after r367777

--- lsof ---
cc -o lsof  -pipe -Wno-misleading-indentation -Wno-tautological-overlap-compare -fcommon -fstack-protector-strong -fno-strict-aliasing -Wno-misleading-indentation -Wno-tautological-overlap-compare -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -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_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 dmnt.o dnode.o dnode1.o dnode2.o dproc.o dsock.o dstore.o  arg.o main.o misc.o node.o print.o proc.o store.o usage.o  util.o -L./lib -llsof  -lkvm
ld: error: undefined symbol: FILEDESC_KVM_LOAD_PWD
>>> referenced by dproc.c
>>>               dproc.o:(gather_proc_info)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [lsof] Error code 1

make[1]: stopped in /wrkdirs/usr/ports/sysutils/lsof/work/lsof-4.93.2
1 error

make[1]: stopped in /wrkdirs/usr/ports/sysutils/lsof/work/lsof-4.93.2
===> Compilation failed unexpectedly.

The attached patch uses the new PWDDESC_KVM_LOAD_PWD macro if it exists and falls back to FILEDESC_KVM_LOAD_PWD if it doesn't.
Comment 1 Tomoaki AOKI 2020-11-21 06:56:24 UTC
FYI, there is another PR [Bug 251096] with slightly different fix,
and with updating to 4.94. It's working for me.