summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/unix.c
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2010-04-28 18:22:11 +0000
committerjsg <jsg@openbsd.org>2010-04-28 18:22:11 +0000
commit5f0520b3492d71198e74eb144452bd52c2f3e737 (patch)
tree3ca4dc2d280efcb44bde8f4b021a70c4a5f9deb2 /usr.bin/netstat/unix.c
parentshuffle extern decl of header[] so gcc4 doesn't complain about (diff)
downloadwireguard-openbsd-5f0520b3492d71198e74eb144452bd52c2f3e737.tar.xz
wireguard-openbsd-5f0520b3492d71198e74eb144452bd52c2f3e737.zip
Rename nfiles so as not to collide with sys/file.h,
makes gcc4 happy. ok deraadt@ miod@
Diffstat (limited to 'usr.bin/netstat/unix.c')
-rw-r--r--usr.bin/netstat/unix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c
index ef15d8bd747..61575badda4 100644
--- a/usr.bin/netstat/unix.c
+++ b/usr.bin/netstat/unix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: unix.c,v 1.13 2007/12/19 01:47:00 deraadt Exp $ */
+/* $OpenBSD: unix.c,v 1.14 2010/04/28 18:22:11 jsg Exp $ */
/* $NetBSD: unix.c,v 1.13 1995/10/03 21:42:48 thorpej Exp $ */
/*-
@@ -57,7 +57,7 @@ struct proc;
static void unixdomainpr(struct socket *, caddr_t);
static struct file *file, *fileNFILE;
-static int nfiles;
+static int fcnt;
extern kvm_t *kvmd;
void
@@ -68,13 +68,13 @@ unixpr(u_long off)
char *filebuf;
struct protosw *unixsw = (struct protosw *)off;
- filebuf = kvm_getfiles(kvmd, KERN_FILE, 0, &nfiles);
+ filebuf = kvm_getfiles(kvmd, KERN_FILE, 0, &fcnt);
if (filebuf == NULL) {
printf("Out of memory (file table).\n");
return;
}
file = (struct file *)(filebuf + sizeof(fp));
- fileNFILE = file + nfiles;
+ fileNFILE = file + fcnt;
for (fp = file; fp < fileNFILE; fp++) {
if (fp->f_count == 0 || fp->f_type != DTYPE_SOCKET)
continue;