git: bb374dd2c103 - stable/13 - sctp: cleanup cdefs.h include

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Thu, 11 Jan 2024 12:45:31 UTC
The branch stable/13 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=bb374dd2c10317ee18a50ff99d3474acb0be74a0

commit bb374dd2c10317ee18a50ff99d3474acb0be74a0
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-08-18 13:25:34 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2024-01-11 12:44:49 +0000

    sctp: cleanup cdefs.h include
    
    (cherry picked from commit c3179e6660e1365111b89cb6c05c3a4c47375e73)
---
 sys/netinet/sctp.h              | 2 +-
 sys/netinet/sctp_asconf.c       | 1 -
 sys/netinet/sctp_asconf.h       | 1 -
 sys/netinet/sctp_auth.c         | 1 -
 sys/netinet/sctp_auth.h         | 1 -
 sys/netinet/sctp_bsd_addr.c     | 1 -
 sys/netinet/sctp_bsd_addr.h     | 1 -
 sys/netinet/sctp_cc_functions.c | 1 -
 sys/netinet/sctp_constants.h    | 1 -
 sys/netinet/sctp_crc32.h        | 1 -
 sys/netinet/sctp_header.h       | 1 -
 sys/netinet/sctp_indata.c       | 1 -
 sys/netinet/sctp_indata.h       | 1 -
 sys/netinet/sctp_input.c        | 1 -
 sys/netinet/sctp_input.h        | 1 -
 sys/netinet/sctp_kdtrace.h      | 1 -
 sys/netinet/sctp_lock_bsd.h     | 1 -
 sys/netinet/sctp_os.h           | 1 -
 sys/netinet/sctp_os_bsd.h       | 6 ++----
 sys/netinet/sctp_output.c       | 1 -
 sys/netinet/sctp_output.h       | 1 -
 sys/netinet/sctp_pcb.c          | 1 -
 sys/netinet/sctp_pcb.h          | 1 -
 sys/netinet/sctp_peeloff.c      | 1 -
 sys/netinet/sctp_peeloff.h      | 1 -
 sys/netinet/sctp_ss_functions.c | 2 +-
 sys/netinet/sctp_structs.h      | 1 -
 sys/netinet/sctp_sysctl.c       | 1 -
 sys/netinet/sctp_sysctl.h       | 1 -
 sys/netinet/sctp_timer.c        | 1 -
 sys/netinet/sctp_timer.h        | 1 -
 sys/netinet/sctp_uio.h          | 1 -
 sys/netinet/sctp_usrreq.c       | 1 -
 sys/netinet/sctp_var.h          | 1 -
 sys/netinet/sctputil.c          | 1 -
 sys/netinet/sctputil.h          | 1 -
 sys/netinet6/sctp6_usrreq.c     | 1 -
 sys/netinet6/sctp6_var.h        | 1 -
 38 files changed, 4 insertions(+), 41 deletions(-)

diff --git a/sys/netinet/sctp.h b/sys/netinet/sctp.h
index e7c584707da2..0a52944473c2 100644
--- a/sys/netinet/sctp.h
+++ b/sys/netinet/sctp.h
@@ -32,10 +32,10 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_H_
 #define _NETINET_SCTP_H_
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 #define SCTP_PACKED __attribute__((packed))
diff --git a/sys/netinet/sctp_asconf.c b/sys/netinet/sctp_asconf.c
index 436638e594c7..3a30b0ba3740 100644
--- a/sys/netinet/sctp_asconf.c
+++ b/sys/netinet/sctp_asconf.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #include <netinet/sctp_var.h>
 #include <netinet/sctp_sysctl.h>
diff --git a/sys/netinet/sctp_asconf.h b/sys/netinet/sctp_asconf.h
index 4d04e8466d75..ab24ea1683bf 100644
--- a/sys/netinet/sctp_asconf.h
+++ b/sys/netinet/sctp_asconf.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_ASCONF_H_
 #define _NETINET_SCTP_ASCONF_H_
 
diff --git a/sys/netinet/sctp_auth.c b/sys/netinet/sctp_auth.c
index a1d25a588daa..67f0d26fa0d5 100644
--- a/sys/netinet/sctp_auth.c
+++ b/sys/netinet/sctp_auth.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #include <netinet/sctp.h>
 #include <netinet/sctp_header.h>
diff --git a/sys/netinet/sctp_auth.h b/sys/netinet/sctp_auth.h
index 45deaabf4059..8bfdbaa6d4f6 100644
--- a/sys/netinet/sctp_auth.h
+++ b/sys/netinet/sctp_auth.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_AUTH_H_
 #define _NETINET_SCTP_AUTH_H_
 
diff --git a/sys/netinet/sctp_bsd_addr.c b/sys/netinet/sctp_bsd_addr.c
index 74f8ab244bb9..83ff0e1e3cc6 100644
--- a/sys/netinet/sctp_bsd_addr.c
+++ b/sys/netinet/sctp_bsd_addr.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #include <netinet/sctp_var.h>
 #include <netinet/sctp_pcb.h>
diff --git a/sys/netinet/sctp_bsd_addr.h b/sys/netinet/sctp_bsd_addr.h
index 8100ba5225ee..5c66db8a7fcb 100644
--- a/sys/netinet/sctp_bsd_addr.h
+++ b/sys/netinet/sctp_bsd_addr.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_BSD_ADDR_H_
 #define _NETINET_SCTP_BSD_ADDR_H_
 
diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c
index 128acff404e3..1f96f88a61dd 100644
--- a/sys/netinet/sctp_cc_functions.c
+++ b/sys/netinet/sctp_cc_functions.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #include <netinet/sctp_var.h>
 #include <netinet/sctp_sysctl.h>
diff --git a/sys/netinet/sctp_constants.h b/sys/netinet/sctp_constants.h
index a1490a515d14..05e804100aa2 100644
--- a/sys/netinet/sctp_constants.h
+++ b/sys/netinet/sctp_constants.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_CONSTANTS_H_
 #define _NETINET_SCTP_CONSTANTS_H_
 
diff --git a/sys/netinet/sctp_crc32.h b/sys/netinet/sctp_crc32.h
index 48a7d3269da5..a8c901249fcb 100644
--- a/sys/netinet/sctp_crc32.h
+++ b/sys/netinet/sctp_crc32.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_CRC32_H_
 #define _NETINET_SCTP_CRC32_H_
 
diff --git a/sys/netinet/sctp_header.h b/sys/netinet/sctp_header.h
index 49a2dcc40ae9..811cb8bab158 100644
--- a/sys/netinet/sctp_header.h
+++ b/sys/netinet/sctp_header.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_HEADER_H_
 #define _NETINET_SCTP_HEADER_H_
 
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c
index 25819af0bdb2..f7f0e3fdfe7f 100644
--- a/sys/netinet/sctp_indata.c
+++ b/sys/netinet/sctp_indata.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #include <sys/proc.h>
 #include <netinet/sctp_var.h>
diff --git a/sys/netinet/sctp_indata.h b/sys/netinet/sctp_indata.h
index 9b2721c6adce..061b65c90bd4 100644
--- a/sys/netinet/sctp_indata.h
+++ b/sys/netinet/sctp_indata.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_INDATA_H_
 #define _NETINET_SCTP_INDATA_H_
 
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index 21fe684efad0..fa0b9f4894ea 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #include <netinet/sctp_var.h>
 #include <netinet/sctp_sysctl.h>
diff --git a/sys/netinet/sctp_input.h b/sys/netinet/sctp_input.h
index b2ea94ef067e..cd736166ac7e 100644
--- a/sys/netinet/sctp_input.h
+++ b/sys/netinet/sctp_input.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_INPUT_H_
 #define _NETINET_SCTP_INPUT_H_
 
diff --git a/sys/netinet/sctp_kdtrace.h b/sys/netinet/sctp_kdtrace.h
index b86a689802b3..0f9b6a9e3826 100644
--- a/sys/netinet/sctp_kdtrace.h
+++ b/sys/netinet/sctp_kdtrace.h
@@ -31,7 +31,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_KDTRACE_H_
 #define _NETINET_SCTP_KDTRACE_H_
 
diff --git a/sys/netinet/sctp_lock_bsd.h b/sys/netinet/sctp_lock_bsd.h
index 4e9197917a9e..ec66be0cf371 100644
--- a/sys/netinet/sctp_lock_bsd.h
+++ b/sys/netinet/sctp_lock_bsd.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_LOCK_BSD_H_
 #define _NETINET_SCTP_LOCK_BSD_H_
 
diff --git a/sys/netinet/sctp_os.h b/sys/netinet/sctp_os.h
index 48ce05239402..42f000dc8d55 100644
--- a/sys/netinet/sctp_os.h
+++ b/sys/netinet/sctp_os.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_OS_H_
 #define _NETINET_SCTP_OS_H_
 
diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h
index 01ab8f2823b8..250feb334bdf 100644
--- a/sys/netinet/sctp_os_bsd.h
+++ b/sys/netinet/sctp_os_bsd.h
@@ -32,12 +32,10 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_OS_BSD_H_
 #define _NETINET_SCTP_OS_BSD_H_
-/*
- * includes
- */
+
+#include <sys/cdefs.h>
 #include "opt_inet6.h"
 #include "opt_inet.h"
 #include "opt_sctp.h"
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 56de9cb860c6..7626e4ec066c 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #include <sys/proc.h>
 #include <netinet/sctp_var.h>
diff --git a/sys/netinet/sctp_output.h b/sys/netinet/sctp_output.h
index d522812c59db..1a1d17221b02 100644
--- a/sys/netinet/sctp_output.h
+++ b/sys/netinet/sctp_output.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_OUTPUT_H_
 #define _NETINET_SCTP_OUTPUT_H_
 
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index 282ffebad541..59686f9ff3f9 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #include <sys/proc.h>
 #include <netinet/sctp_var.h>
diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h
index 7d3656ed6dfd..ca51f519a24d 100644
--- a/sys/netinet/sctp_pcb.h
+++ b/sys/netinet/sctp_pcb.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_PCB_H_
 #define _NETINET_SCTP_PCB_H_
 
diff --git a/sys/netinet/sctp_peeloff.c b/sys/netinet/sctp_peeloff.c
index ff92bd4d5d88..b122ab50e74e 100644
--- a/sys/netinet/sctp_peeloff.c
+++ b/sys/netinet/sctp_peeloff.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #include <netinet/sctp_pcb.h>
 #include <netinet/sctputil.h>
diff --git a/sys/netinet/sctp_peeloff.h b/sys/netinet/sctp_peeloff.h
index 8be10d00e5de..675369af0fa8 100644
--- a/sys/netinet/sctp_peeloff.h
+++ b/sys/netinet/sctp_peeloff.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_PEELOFF_H_
 #define _NETINET_SCTP_PEELOFF_H_
 #if defined(_KERNEL)
diff --git a/sys/netinet/sctp_ss_functions.c b/sys/netinet/sctp_ss_functions.c
index 896a55c6fbc5..1d7b16a6b482 100644
--- a/sys/netinet/sctp_ss_functions.c
+++ b/sys/netinet/sctp_ss_functions.c
@@ -28,7 +28,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
+#include <netinet/sctp_os.h>
 #include <netinet/sctp_pcb.h>
 
 /*
diff --git a/sys/netinet/sctp_structs.h b/sys/netinet/sctp_structs.h
index 81a0645fa528..fb7deafa9ea3 100644
--- a/sys/netinet/sctp_structs.h
+++ b/sys/netinet/sctp_structs.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_STRUCTS_H_
 #define _NETINET_SCTP_STRUCTS_H_
 
diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c
index 88d16f71ef3c..fa93deba8b53 100644
--- a/sys/netinet/sctp_sysctl.c
+++ b/sys/netinet/sctp_sysctl.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #include <netinet/sctp.h>
 #include <netinet/sctp_constants.h>
diff --git a/sys/netinet/sctp_sysctl.h b/sys/netinet/sctp_sysctl.h
index ba0d18111df6..2eeddd42f7a2 100644
--- a/sys/netinet/sctp_sysctl.h
+++ b/sys/netinet/sctp_sysctl.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_SYSCTL_H_
 #define _NETINET_SCTP_SYSCTL_H_
 
diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c
index 3cf3baec7ad3..ef5eb8b89a5d 100644
--- a/sys/netinet/sctp_timer.c
+++ b/sys/netinet/sctp_timer.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #define _IP_VHL
 #include <netinet/sctp_os.h>
 #include <netinet/sctp_pcb.h>
diff --git a/sys/netinet/sctp_timer.h b/sys/netinet/sctp_timer.h
index 846e99fc59e2..f6f99d903d9f 100644
--- a/sys/netinet/sctp_timer.h
+++ b/sys/netinet/sctp_timer.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_TIMER_H_
 #define _NETINET_SCTP_TIMER_H_
 
diff --git a/sys/netinet/sctp_uio.h b/sys/netinet/sctp_uio.h
index 40fda91d84ae..09af1b59fcae 100644
--- a/sys/netinet/sctp_uio.h
+++ b/sys/netinet/sctp_uio.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_UIO_H_
 #define _NETINET_SCTP_UIO_H_
 
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index b28bfc66af8d..a7af1da8624a 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #include <sys/proc.h>
 #include <netinet/sctp_pcb.h>
diff --git a/sys/netinet/sctp_var.h b/sys/netinet/sctp_var.h
index 0177dd5ac227..c1c34e542ef2 100644
--- a/sys/netinet/sctp_var.h
+++ b/sys/netinet/sctp_var.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_VAR_H_
 #define _NETINET_SCTP_VAR_H_
 
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index 828455207fe2..380aee5f671d 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #include <netinet/sctp_pcb.h>
 #include <netinet/sctputil.h>
diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h
index f0f6d6bccfc7..c649611d5004 100644
--- a/sys/netinet/sctputil.h
+++ b/sys/netinet/sctputil.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET_SCTP_UTIL_H_
 #define _NETINET_SCTP_UTIL_H_
 
diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c
index dca38401c02b..82829d3ba8c5 100644
--- a/sys/netinet6/sctp6_usrreq.c
+++ b/sys/netinet6/sctp6_usrreq.c
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <netinet/sctp_os.h>
 #ifdef INET6
 #include <sys/proc.h>
diff --git a/sys/netinet6/sctp6_var.h b/sys/netinet6/sctp6_var.h
index 08f0e37c1e5d..1ba1dcb54452 100644
--- a/sys/netinet6/sctp6_var.h
+++ b/sys/netinet6/sctp6_var.h
@@ -32,7 +32,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef _NETINET6_SCTP6_VAR_H_
 #define _NETINET6_SCTP6_VAR_H_