mirror of
https://git.freebsd.org/ports.git
synced 2025-05-16 01:01:49 -04:00
* 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
24 lines
790 B
C
24 lines
790 B
C
--- dialects/freebsd/dproc.c.orig 2020-11-10 19:00:21 UTC
|
|
+++ dialects/freebsd/dproc.c
|
|
@@ -125,6 +125,9 @@ gather_proc_info()
|
|
* streams with eXPORT data,
|
|
* where supported */
|
|
struct filedesc fd;
|
|
+#if defined(PWDDESC_KVM_LOAD_PWD)
|
|
+ struct pwddesc pd;
|
|
+#endif /* defined(PWDDESC_KVM_LOAD_PWD) */
|
|
int i, nf;
|
|
MALLOC_S nb;
|
|
|
|
@@ -330,7 +333,11 @@ gather_proc_info()
|
|
|
|
#if defined(HAS_PWD)
|
|
cdir = rdir = jdir = NULL;
|
|
+#if defined(PWDDESC_KVM_LOAD_PWD)
|
|
+ pwd_addr = (KA_T)PWDDESC_KVM_LOAD_PWD(&pd);
|
|
+#else /* defined(PWDDESC_KVM_LOAD_PWD) */
|
|
pwd_addr = (KA_T)FILEDESC_KVM_LOAD_PWD(&fd);
|
|
+#endif /* defened(PWDDESC_KVM_LOAD_PWD) */
|
|
if (pwd_addr != 0) {
|
|
if (!kread(pwd_addr, (char *)&pwd, sizeof(pwd))) {
|
|
cdir = pwd.pwd_cdir;
|