Index: head/sysutils/lsof/Makefile =================================================================== --- head/sysutils/lsof/Makefile (revision 520538) +++ head/sysutils/lsof/Makefile (revision 520539) @@ -1,45 +1,45 @@ # Created by: David O'Brien # $FreeBSD$ PORTNAME= lsof DISTVERSION= 4.93.2 -PORTREVISION= 5 +PORTREVISION= 6 PORTEPOCH= 8 CATEGORIES= sysutils MAINTAINER= ler@FreeBSD.org COMMENT= Lists information about open files (similar to fstat(1)) LICENSE= lsof LICENSE_NAME= lsof LICENSE_FILE= ${FILESDIR}/LICENSE LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept USES= shebangfix tar:bzip2 HAS_CONFIGURE= yes USE_GITHUB= yes GH_ACCOUNT= lsof-org SHEBANG_FILES= scripts/sort_res.perl5 .include CONFIGURE_SCRIPT= Configure CONFIGURE_ARGS= -n freebsd CONFIGURE_ENV= LSOF_CC="${CC}" FREEBSD_SYS="${SRC_BASE}/sys" .if !exists(${SRC_BASE}/sys/kern/kern_lockf.c) IGNORE+= requires kernel sources .endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/lsof ${STAGEDIR}${PREFIX}/sbin (cd ${WRKSRC} && ${SED} 's/\\$$/\\DUMMY/' Lsof.8 | mandoc -T man | ${SED} 's/DUMMY$$//' > ${WRKSRC}/lsof.8) ${INSTALL_MAN} ${WRKSRC}/lsof.8 ${STAGEDIR}${MAN8PREFIX}/man/man8/lsof.8 @${MKDIR} ${STAGEDIR}${PREFIX}/share/lsof ${INSTALL_SCRIPT} ${WRKSRC}/scripts/* ${STAGEDIR}${PREFIX}/share/lsof @${CHMOD} 0444 ${STAGEDIR}${PREFIX}/share/lsof/00* .include Index: head/sysutils/lsof/files/patch-dialects_freebsd_dnode.c =================================================================== --- head/sysutils/lsof/files/patch-dialects_freebsd_dnode.c (nonexistent) +++ head/sysutils/lsof/files/patch-dialects_freebsd_dnode.c (revision 520539) @@ -0,0 +1,12 @@ +--- dialects/freebsd/dnode.c.orig 2019-12-19 21:29:42 UTC ++++ dialects/freebsd/dnode.c +@@ -58,9 +58,7 @@ _PROTOTYPE(static int lkup_dev_tty,(dev_t *dr, INODETY + + + #if defined(HAS_TMPFS) +-#define _KERNEL + #include +-#undef _KERNEL + #endif /* defined(HAS_TMPFS) */ + + _PROTOTYPE(static void get_lock_state,(KA_T f)); Property changes on: head/sysutils/lsof/files/patch-dialects_freebsd_dnode.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/lsof/files/patch-dialects_freebsd_dproc.c =================================================================== --- head/sysutils/lsof/files/patch-dialects_freebsd_dproc.c (nonexistent) +++ head/sysutils/lsof/files/patch-dialects_freebsd_dproc.c (revision 520539) @@ -0,0 +1,57 @@ +--- dialects/freebsd/dproc.c.orig 2019-05-08 07:32:25 UTC ++++ dialects/freebsd/dproc.c +@@ -655,7 +655,29 @@ kread(addr, buf, len) + return((br == len) ? 0 : 1); + } + ++static int ++vm_map_reader(void *token, vm_map_entry_t addr, vm_map_entry_t dest) ++{ ++ return (kread((KA_T)addr, (char *)dest, sizeof(*dest))); ++} + ++#if __FreeBSD_version < 1300060 ++typedef int vm_map_entry_reader(void *token, vm_map_entry_t addr, ++ vm_map_entry_t dest); ++ ++static inline vm_map_entry_t ++vm_map_entry_read_succ(void *token, struct vm_map_entry *const clone, ++ vm_map_entry_reader reader) ++{ ++ vm_map_entry_t next; ++ ++ next = clone->next; ++ if (!reader(token, next, clone)) ++ return (NULL); ++ return (next); ++} ++#endif /* __FreeBSD_version < 1300060 */ ++ + /* + * process_text() - process text information + */ +@@ -682,20 +704,15 @@ process_text(vm) + /* + * Read the vm_map structure. Search its vm_map_entry structure list. + */ ++ vmme = vmsp.vm_map.header; ++ e = &vmme; + for (i = 0; i < vmsp.vm_map.nentries; i++) { + + /* + * Read the next vm_map_entry. + */ +- if (i == 0) +- e = &vmsp.vm_map.header; +- else { +- if (!(ka = (KA_T)e->next)) +- return; +- e = &vmme; +- if (kread(ka, (char *)e, sizeof(vmme))) +- return; +- } ++ if (!vm_map_entry_read_succ(NULL, e, vm_map_reader)) ++ return; + + #if defined(MAP_ENTRY_IS_A_MAP) + if (e->eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP)) Property changes on: head/sysutils/lsof/files/patch-dialects_freebsd_dproc.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property