cvs commit: src/sys/net rtsock.c src/sys/netproto/atalk at_proto.c src/sys/netproto/ipx ipx_proto.c src/sys/netproto/natm natm_proto.c

Sascha Wildner saw at
Mon Oct 23 01:45:51 PDT 2006

Matthew Dillon wrote:
    If these were previously static and worked, then perhaps the
    solution is to remove the extern's rather then make the static
    declarations global.
If I remove the externs then GCC 4.1 will choke on routedomain being 
referenced in the routesw declaration before it's known. The problem is 
that routesw and routedomain reference each other, and the extern tries 
to compensate for that.

Here's the code in question (from sys/net/rtsock.c) before my commit, in 
case someone has a better idea:

extern struct domain routedomain;               /* or at least forward */
static struct protosw routesw[] = {
{ SOCK_RAW,     &routedomain,   0,              PR_ATOMIC|PR_ADDR,
  0,            route_output,   raw_ctlinput,   0,
  raw_init,     0,              0,              0,
static struct domain routedomain = {
        PF_ROUTE, "route", NULL, NULL, NULL,
        routesw, &routesw[(sizeof routesw)/(sizeof routesw[0])],


More information about the Commits mailing list