summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2010-04-28 18:22:12 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2010-04-28 18:22:12 +0000
commit825c9d371423c01e39a068dbf06ff95e3faeca12 (patch)
tree50a6cb694cd3dfaeef7ca0ec968514117539e354
parenta8af3a4981aea36be1367c114fb343bad1aae360 (diff)
Rename nfiles so as not to collide with sys/file.h,
makes gcc4 happy. ok deraadt@ miod@
-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;