mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Removed nested include if <sys/socket.h> from <net/if.h> and
<net/if_arp.h> and fixed the things that depended on it. The nested include just allowed unportable programs to compile and made my simple #include checking program report that networking code doesn't need to include <sys/socket.h>.
This commit is contained in:
parent
bfcffdaf03
commit
4458ac71b1
11 changed files with 20 additions and 15 deletions
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
|
||||
* $Id: genassym.c,v 1.37 1996/07/31 09:25:51 davidg Exp $
|
||||
* $Id: genassym.c,v 1.38 1996/07/31 12:36:10 bde Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -50,6 +50,7 @@
|
|||
#include <sys/mount.h>
|
||||
#endif
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/msgbuf.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/trap.h>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* 4. Modifications may be freely made to this file if the above conditions
|
||||
* are met.
|
||||
*
|
||||
* $Id: 3c5x9.c,v 1.5 1996/09/06 23:06:53 phk Exp $
|
||||
* $Id: 3c5x9.c,v 1.6 1996/10/12 17:34:25 bde Exp $
|
||||
*/
|
||||
|
||||
#include "eisa.h"
|
||||
|
|
@ -28,6 +28,7 @@
|
|||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <machine/clock.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_fxp.c,v 1.19 1996/09/22 11:48:54 davidg Exp $
|
||||
* $Id: if_fxp.c,v 1.20 1996/09/29 10:20:45 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
@ -39,6 +39,7 @@
|
|||
#include <sys/mbuf.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#include <net/if.h>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* 4. Modifications may be freely made to this file if the above conditions
|
||||
* are met.
|
||||
*
|
||||
* $Id: 3c5x9.c,v 1.5 1996/09/06 23:06:53 phk Exp $
|
||||
* $Id: 3c5x9.c,v 1.6 1996/10/12 17:34:25 bde Exp $
|
||||
*/
|
||||
|
||||
#include "eisa.h"
|
||||
|
|
@ -28,6 +28,7 @@
|
|||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <machine/clock.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
|
||||
* $Id: genassym.c,v 1.37 1996/07/31 09:25:51 davidg Exp $
|
||||
* $Id: genassym.c,v 1.38 1996/07/31 12:36:10 bde Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -50,6 +50,7 @@
|
|||
#include <sys/mount.h>
|
||||
#endif
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/msgbuf.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/trap.h>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)if.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: if.h,v 1.33 1996/08/04 10:54:12 phk Exp $
|
||||
* $Id: if.h,v 1.34 1996/08/26 23:17:17 julian Exp $
|
||||
*/
|
||||
|
||||
#ifndef _NET_IF_H_
|
||||
|
|
@ -62,8 +62,6 @@
|
|||
* interfaces. These routines live in the files if.c and route.c
|
||||
*/
|
||||
|
||||
#include <sys/socket.h> /* for struct sockaddr */
|
||||
|
||||
#ifndef _TIME_ /* XXX fast fix for SNMP, going away soon */
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,14 +31,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)if_arp.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: if_arp.h,v 1.4 1994/11/15 14:41:38 bde Exp $
|
||||
* $Id: if_arp.h,v 1.5 1994/11/16 02:15:05 phk Exp $
|
||||
*/
|
||||
|
||||
#ifndef _NET_IF_ARP_H_
|
||||
#define _NET_IF_ARP_H_
|
||||
|
||||
#include <sys/socket.h> /* for struct sockaddr */
|
||||
|
||||
/*
|
||||
* Address Resolution Protocol.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: if_mib.c,v 1.1 1996/07/30 19:17:00 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
|
@ -34,6 +34,7 @@
|
|||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <net/if.h>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)if_ether.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: if_ether.c,v 1.32 1996/06/20 22:53:08 fenner Exp $
|
||||
* $Id: if_ether.c,v 1.33 1996/06/21 21:45:58 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
@ -47,6 +47,7 @@
|
|||
#include <sys/systm.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#include <net/if.h>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* This software is provided ``AS IS'' without any warranties of any kind.
|
||||
*
|
||||
* $Id: ip_fw.c,v 1.49 1996/08/31 21:05:20 alex Exp $
|
||||
* $Id: ip_fw.c,v 1.50 1996/10/12 19:38:50 alex Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
@ -29,6 +29,7 @@
|
|||
#include <sys/mbuf.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <net/if.h>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_fxp.c,v 1.19 1996/09/22 11:48:54 davidg Exp $
|
||||
* $Id: if_fxp.c,v 1.20 1996/09/29 10:20:45 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
@ -39,6 +39,7 @@
|
|||
#include <sys/mbuf.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#include <net/if.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue