Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet netinet: Include the needful so include order do...



details:   https://anonhg.NetBSD.org/src/rev/0964161fbf0c
branches:  trunk
changeset: 975388:0964161fbf0c
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Aug 28 07:01:57 2020 +0000

description:
netinet: Include the needful so include order doesn't matter.

diffstat:

 sys/netinet/in_pcb.h     |  27 +++++++++++++++++++++++----
 sys/netinet/in_pcb_hdr.h |   9 ++++++++-
 sys/netinet/in_systm.h   |   4 +++-
 sys/netinet/ip.h         |   9 +++++++--
 4 files changed, 41 insertions(+), 8 deletions(-)

diffs (127 lines):

diff -r 8246a86a6a6b -r 0964161fbf0c sys/netinet/in_pcb.h
--- a/sys/netinet/in_pcb.h      Fri Aug 28 06:47:18 2020 +0000
+++ b/sys/netinet/in_pcb.h      Fri Aug 28 07:01:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in_pcb.h,v 1.67 2020/08/20 21:21:32 riastradh Exp $    */
+/*     $NetBSD: in_pcb.h,v 1.68 2020/08/28 07:01:57 riastradh Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -63,9 +63,16 @@
 #ifndef _NETINET_IN_PCB_H_
 #define _NETINET_IN_PCB_H_
 
-#include <sys/queue.h>
+#include <sys/types.h>
+
 #include <net/route.h>
+
+#include <netinet/in.h>
 #include <netinet/in_pcb_hdr.h>
+#include <netinet/ip.h>
+
+struct ip_moptions;
+struct mbuf;
 
 /*
  * Common structure pcb for internet protocol implementation.
@@ -133,6 +140,17 @@
 #define        inp_locked(inp)         solocked((inp)->inp_socket)
 
 #ifdef _KERNEL
+
+#include <sys/kauth.h>
+#include <sys/queue.h>
+
+struct inpcbtable;
+struct lwp;
+struct rtentry;
+struct sockaddr_in;
+struct socket;
+struct vestigial_inpcb;
+
 void   in_losing(struct inpcb *);
 int    in_pcballoc(struct socket *, void *);
 int    in_pcbbindableaddr(struct sockaddr_in *, kauth_cred_t);
@@ -173,6 +191,7 @@
        inp->inp_overudp_cb = cb;
        inp->inp_overudp_arg = arg;
 }
-#endif
 
-#endif /* !_NETINET_IN_PCB_H_ */
+#endif /* _KERNEL */
+
+#endif /* !_NETINET_IN_PCB_H_ */
diff -r 8246a86a6a6b -r 0964161fbf0c sys/netinet/in_pcb_hdr.h
--- a/sys/netinet/in_pcb_hdr.h  Fri Aug 28 06:47:18 2020 +0000
+++ b/sys/netinet/in_pcb_hdr.h  Fri Aug 28 07:01:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in_pcb_hdr.h,v 1.14 2020/08/20 21:21:32 riastradh Exp $        */
+/*     $NetBSD: in_pcb_hdr.h,v 1.15 2020/08/28 07:01:57 riastradh Exp $        */
 
 /*
  * Copyright (C) 2003 WIDE Project.
@@ -63,9 +63,16 @@
 #ifndef _NETINET_IN_PCB_HDR_H_
 #define _NETINET_IN_PCB_HDR_H_
 
+#include <sys/types.h>
 #include <sys/queue.h>
 
+#include <netinet/in.h>
+
 struct inpcbpolicy;
+struct inpcbtable;
+struct mbuf;
+struct sockaddr;
+struct socket;
 
 /*
  * align it with inpcb and in6pcb!
diff -r 8246a86a6a6b -r 0964161fbf0c sys/netinet/in_systm.h
--- a/sys/netinet/in_systm.h    Fri Aug 28 06:47:18 2020 +0000
+++ b/sys/netinet/in_systm.h    Fri Aug 28 07:01:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in_systm.h,v 1.13 2005/12/10 23:36:23 elad Exp $       */
+/*     $NetBSD: in_systm.h,v 1.14 2020/08/28 07:01:57 riastradh Exp $  */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -39,6 +39,8 @@
  * definitions for kernel.
  */
 
+#include <sys/types.h>
+
 /*
  * Network types.
  *
diff -r 8246a86a6a6b -r 0964161fbf0c sys/netinet/ip.h
--- a/sys/netinet/ip.h  Fri Aug 28 06:47:18 2020 +0000
+++ b/sys/netinet/ip.h  Fri Aug 28 07:01:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip.h,v 1.34 2012/11/02 21:07:07 christos Exp $ */
+/*     $NetBSD: ip.h,v 1.35 2020/08/28 07:01:57 riastradh Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -34,7 +34,11 @@
 #ifndef _NETINET_IP_H_
 #define _NETINET_IP_H_
 
+#include <sys/types.h>
+
+#include <netinet/in.h>
 #include <netinet/in_systm.h>  /* for n_time */
+
 /*
  * Definitions for internet protocol version 4.
  * Per RFC 791, September 1981.
@@ -243,4 +247,5 @@
        u_int8_t        ippseudo_p;     /* protocol */
        u_int16_t       ippseudo_len;   /* protocol length */
 } __packed;
-#endif /* !_NETINET_IP_H_ */
+
+#endif /* !_NETINET_IP_H_ */



Home | Main Index | Thread Index | Old Index