summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2005-09-07 10:06:14 +0000
committerobrien <obrien@FreeBSD.org>2005-09-07 10:06:14 +0000
commitb888392910bbf46a7bf35f9715822cfd277e96a9 (patch)
tree419df19dbf78d24314ca254786a51b47f4cc0f57
parent34dc93c2f2a2e67b9f17f39ad8552571a143e782 (diff)
downloadFreeBSD-src-b888392910bbf46a7bf35f9715822cfd277e96a9.zip
FreeBSD-src-b888392910bbf46a7bf35f9715822cfd277e96a9.tar.gz
Forward declaring static variables as extern is invalid ISO-C. Now that
GCC can properly handle forward static declarations, do this properly.
-rw-r--r--sys/kern/kern_tc.c2
-rw-r--r--sys/net/rtsock.c2
-rw-r--r--sys/netipx/ipx_proto.c3
-rw-r--r--sys/netnatm/natm_proto.c4
4 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index f9b54a0..fb06e18 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -61,7 +61,7 @@ struct timehands {
struct timehands *th_next;
};
-extern struct timehands th0;
+static struct timehands th0;
static struct timehands th9 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th0};
static struct timehands th8 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th9};
static struct timehands th7 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th8};
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 5bbe57e..cf34315 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1254,7 +1254,7 @@ SYSCTL_NODE(_net, PF_ROUTE, routetable, CTLFLAG_RD, sysctl_rtsock, "");
* Definitions of protocols supported in the ROUTE domain.
*/
-extern struct domain routedomain; /* or at least forward */
+static struct domain routedomain; /* or at least forward */
static struct protosw routesw[] = {
{ SOCK_RAW, &routedomain, 0, PR_ATOMIC|PR_ADDR,
diff --git a/sys/netipx/ipx_proto.c b/sys/netipx/ipx_proto.c
index 8f16aae..f91ac0c 100644
--- a/sys/netipx/ipx_proto.c
+++ b/sys/netipx/ipx_proto.c
@@ -53,13 +53,14 @@ __FBSDID("$FreeBSD$");
#include <netipx/ipx_var.h>
#include <netipx/spx.h>
-extern struct domain ipxdomain;
static struct pr_usrreqs nousrreqs;
/*
* IPX protocol family: IPX, ERR, PXP, SPX, ROUTE.
*/
+static struct domain ipxdomain;
+
static struct protosw ipxsw[] = {
{ 0, &ipxdomain, 0, 0,
0, 0, 0, 0,
diff --git a/sys/netnatm/natm_proto.c b/sys/netnatm/natm_proto.c
index 2627bed..6d7a951 100644
--- a/sys/netnatm/natm_proto.c
+++ b/sys/netnatm/natm_proto.c
@@ -52,10 +52,10 @@ __FBSDID("$FreeBSD$");
#include <netnatm/natm.h>
-extern struct domain natmdomain;
-
static void natm_init(void);
+static struct domain natmdomain;
+
static struct protosw natmsw[] = {
{ SOCK_STREAM, &natmdomain, PROTO_NATMAAL5, PR_CONNREQUIRED,
0, 0, 0, 0,
OpenPOWER on IntegriCloud