ports/sysutils/lsof/files/patch-dialects-freebsd-dlsof.h
Dimitry Andric 5fd66cdfbf sysutils/lsof: Update to 4.94
* Update to 4.94.
* Update or remove patches that are included in upstream.
* Fix build with Clang 11 without setting 'CFLAGS+=-fcommon' in Makefile.
* Use new pwddesc structure if applicable.

Change Log: https://github.com/lsof-org/lsof/releases/tag/4.94.0

Submitted by:	Yasuhiro Kimura <yasu@utahime.org>
PR:		251096
MFH:		2021Q1
2021-01-30 13:12:16 +00:00

27 lines
963 B
C

--- dialects/freebsd/dlsof.h.orig 2020-11-10 19:00:21 UTC
+++ dialects/freebsd/dlsof.h
@@ -559,7 +559,7 @@ typedef u_long KA_T;
* Global storage definitions (including their structure definitions)
*/
-struct file * Cfp;
+extern struct file * Cfp;
# if FREEBSDV>=2000
extern kvm_t *Kd;
@@ -663,9 +663,15 @@ struct sfile {
*/
struct namecache {
+# if __FreeBSD_version < 1202000 || (__FreeBSD_version >= 1300000 && __FreeBSD_version < 1300105)
LIST_ENTRY(namecache) nc_hash; /* hash chain */
LIST_ENTRY(namecache) nc_src; /* source vnode list */
TAILQ_ENTRY(namecache) nc_dst; /* destination vnode list */
+# else
+ LIST_ENTRY(namecache) nc_src; /* source vnode list */
+ TAILQ_ENTRY(namecache) nc_dst; /* destination vnode list */
+ LIST_ENTRY(namecache) nc_hash; /* hash chain */
+# endif
struct vnode *nc_dvp; /* vnode of parent of name */
struct vnode *nc_vp; /* vnode the name refers to */
u_char nc_flag; /* flag bits */