move decl of inetsw to its own header to avoid array of incomplete type.

found by gcc4.  reported by Adam Ciarcinski.
This commit is contained in:
yamt 2005-04-29 10:39:09 +00:00
parent 9aacd16106
commit 34c3fec469
9 changed files with 61 additions and 16 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: in_proto.c,v 1.68 2005/02/12 12:31:07 manu Exp $ */
/* $NetBSD: in_proto.c,v 1.69 2005/04/29 10:39:09 yamt Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: in_proto.c,v 1.68 2005/02/12 12:31:07 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: in_proto.c,v 1.69 2005/04/29 10:39:09 yamt Exp $");
#include "opt_mrouting.h"
#include "opt_eon.h" /* ISO CLNL over IP */
@ -87,6 +87,7 @@ __KERNEL_RCSID(0, "$NetBSD: in_proto.c,v 1.68 2005/02/12 12:31:07 manu Exp $");
#include <netinet/ip_var.h>
#include <netinet/ip_icmp.h>
#include <netinet/in_pcb.h>
#include <netinet/in_proto.h>
#ifdef INET6
#ifndef INET

39
sys/netinet/in_proto.h Normal file
View File

@ -0,0 +1,39 @@
/* $NetBSD: in_proto.h,v 1.1 2005/04/29 10:39:09 yamt Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)ip_var.h 8.2 (Berkeley) 1/9/95
*/
#ifndef _NETINET_IN_PROTO_H_
#define _NETINET_IN_PROTO_H_
extern const struct protosw inetsw[];
#endif /* _NETINET_IN_PROTO_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_icmp.c,v 1.91 2005/02/26 22:45:12 perry Exp $ */
/* $NetBSD: ip_icmp.c,v 1.92 2005/04/29 10:39:09 yamt Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -101,7 +101,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.91 2005/02/26 22:45:12 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.92 2005/04/29 10:39:09 yamt Exp $");
#include "opt_ipsec.h"
@ -126,6 +126,7 @@ __KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.91 2005/02/26 22:45:12 perry Exp $");
#include <netinet/ip_icmp.h>
#include <netinet/ip_var.h>
#include <netinet/in_pcb.h>
#include <netinet/in_proto.h>
#include <netinet/icmp_var.h>
#ifdef IPSEC

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_input.c,v 1.214 2005/04/18 21:50:25 yamt Exp $ */
/* $NetBSD: ip_input.c,v 1.215 2005/04/29 10:39:09 yamt Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -98,7 +98,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.214 2005/04/18 21:50:25 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.215 2005/04/29 10:39:09 yamt Exp $");
#include "opt_inet.h"
#include "opt_gateway.h"
@ -131,6 +131,7 @@ __KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.214 2005/04/18 21:50:25 yamt Exp $");
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/in_pcb.h>
#include <netinet/in_proto.h>
#include <netinet/in_var.h>
#include <netinet/ip_var.h>
#include <netinet/ip_icmp.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_var.h,v 1.70 2005/04/07 12:22:47 yamt Exp $ */
/* $NetBSD: ip_var.h,v 1.71 2005/04/29 10:39:09 yamt Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -192,7 +192,6 @@ struct ipflow {
#define IP_HDR_ALIGNED_P(ip) ((((vaddr_t) (ip)) & 3) == 0)
#endif
extern const struct protosw inetsw[];
extern struct domain inetdomain;
extern struct ipstat ipstat; /* ip statistics */

View File

@ -1,4 +1,4 @@
/* $NetBSD: raw_ip.c,v 1.86 2005/03/11 06:16:16 atatat Exp $ */
/* $NetBSD: raw_ip.c,v 1.87 2005/04/29 10:39:09 yamt Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.86 2005/03/11 06:16:16 atatat Exp $");
__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.87 2005/04/29 10:39:09 yamt Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@ -88,6 +88,7 @@ __KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.86 2005/03/11 06:16:16 atatat Exp $");
#include <netinet/ip_mroute.h>
#include <netinet/ip_icmp.h>
#include <netinet/in_pcb.h>
#include <netinet/in_proto.h>
#include <netinet/in_var.h>
#include <machine/stdarg.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ah_input.c,v 1.45 2005/04/23 14:05:28 manu Exp $ */
/* $NetBSD: ah_input.c,v 1.46 2005/04/29 10:39:09 yamt Exp $ */
/* $KAME: ah_input.c,v 1.64 2001/09/04 08:43:19 itojun Exp $ */
/*
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ah_input.c,v 1.45 2005/04/23 14:05:28 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: ah_input.c,v 1.46 2005/04/29 10:39:09 yamt Exp $");
#include "opt_inet.h"
@ -59,6 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: ah_input.c,v 1.45 2005/04/23 14:05:28 manu Exp $");
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/in_proto.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/ip_ecn.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: esp_input.c,v 1.36 2005/04/23 14:05:28 manu Exp $ */
/* $NetBSD: esp_input.c,v 1.37 2005/04/29 10:39:09 yamt Exp $ */
/* $KAME: esp_input.c,v 1.60 2001/09/04 08:43:19 itojun Exp $ */
/*
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: esp_input.c,v 1.36 2005/04/23 14:05:28 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: esp_input.c,v 1.37 2005/04/29 10:39:09 yamt Exp $");
#include "opt_inet.h"
@ -61,6 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: esp_input.c,v 1.36 2005/04/23 14:05:28 manu Exp $");
#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/in_var.h>
#include <netinet/in_proto.h>
#include <netinet/ip_ecn.h>
#include <netinet/ip_icmp.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipcomp_input.c,v 1.23 2005/04/23 14:05:28 manu Exp $ */
/* $NetBSD: ipcomp_input.c,v 1.24 2005/04/29 10:39:09 yamt Exp $ */
/* $KAME: ipcomp_input.c,v 1.29 2001/09/04 08:43:19 itojun Exp $ */
/*
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ipcomp_input.c,v 1.23 2005/04/23 14:05:28 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: ipcomp_input.c,v 1.24 2005/04/29 10:39:09 yamt Exp $");
#include "opt_inet.h"
@ -60,6 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: ipcomp_input.c,v 1.23 2005/04/23 14:05:28 manu Exp $
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/in_proto.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/ip_ecn.h>