$OpenBSD: patch-lsof_c,v 1.2 2012/01/17 17:08:16 sthen Exp $ --- lsof.c.orig Tue Jan 17 16:44:32 2012 +++ lsof.c Tue Jan 17 16:52:37 2012 @@ -27,7 +27,7 @@ #define LSOFCMD "lsof -HPsli TCP | awk '{print $3,$NF}' | sort | uniq" #else /* !OLDLSOF */ /* These use the current (as of 3.62W, at least) parameters for lsof */ -#define LSOFCMD "lsof -nPsli TCP | awk '{print $3,$NF}' | sort | uniq" +#define LSOFCMD "lsof -nPli TCP | awk '{print $3,$(NF - 1)}' | sort | uniq" #endif /* !OLDLSOF */ #endif /* LSOFCMD */