Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/netstat no need to forward declare struct uio and pr...



details:   https://anonhg.NetBSD.org/src/rev/6ef1312568d1
branches:  trunk
changeset: 754165:6ef1312568d1
user:      plunky <plunky%NetBSD.org@localhost>
date:      Thu Apr 22 14:37:06 2010 +0000

description:
no need to forward declare struct uio and proc before including
<sys/file.h> as it does that internally, and don't continue the
_KERNEL definition afterwards as it causes some other problems
with pcc relating to unreferenced symbols in unused static
inline functions which gcc optimises away.

diffstat:

 usr.bin/netstat/unix.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 54abc4b0a039 -r 6ef1312568d1 usr.bin/netstat/unix.c
--- a/usr.bin/netstat/unix.c    Thu Apr 22 14:32:30 2010 +0000
+++ b/usr.bin/netstat/unix.c    Thu Apr 22 14:37:06 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: unix.c,v 1.29 2009/04/12 16:08:37 lukem Exp $  */
+/*     $NetBSD: unix.c,v 1.30 2010/04/22 14:37:06 plunky Exp $ */
 
 /*-
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "from: @(#)unix.c       8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: unix.c,v 1.29 2009/04/12 16:08:37 lukem Exp $");
+__RCSID("$NetBSD: unix.c,v 1.30 2010/04/22 14:37:06 plunky Exp $");
 #endif
 #endif /* not lint */
 
@@ -53,9 +53,8 @@
 #include <sys/un.h>
 #include <sys/unpcb.h>
 #define _KERNEL
-struct uio;
-struct proc;
 #include <sys/file.h>
+#undef _KERNEL
 
 #include <netinet/in.h>
 



Home | Main Index | Thread Index | Old Index