From 7497d33f2f5475c0d2e516dde221c1222271ec07 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 4 Jan 2024 15:56:25 -0500 Subject: [PATCH 01/11] lib: select.h is not being used by anyone Signed-off-by: Donald Sharp --- lib/zebra.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/zebra.h b/lib/zebra.h index 06be33f5dd..07cfc4492c 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -25,7 +25,6 @@ #ifdef HAVE_STROPTS_H #include #endif /* HAVE_STROPTS_H */ -#include #include #include #include From 848dcf3d034bc2ca390b6aff968be83eaf11e584 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 4 Jan 2024 16:03:55 -0500 Subject: [PATCH 02/11] *: remove sys/stat.h from zebra.h Signed-off-by: Donald Sharp --- bfdd/control.c | 1 + bgpd/bgp_dump.c | 1 + ldpd/control.c | 1 + lib/command.c | 1 + lib/libfrr.c | 1 + lib/mgmt_msg.c | 2 ++ lib/northbound_cli.c | 1 + lib/pid_output.c | 1 + lib/systemd.c | 1 + lib/vty.c | 2 +- lib/zebra.h | 1 - lib/zlog.c | 1 + ospf6d/ospf6_auth_trailer.c | 1 + ospfd/ospf_auth.c | 1 + tests/helpers/c/main.c | 1 + tests/isisd/test_isis_spf.c | 1 + tests/lib/cli/common_cli.c | 1 + tests/lib/northbound/test_oper_data.c | 1 + tests/lib/test_privs.c | 1 + tests/ospfd/test_ospf_spf.c | 1 + tools/gen_northbound_callbacks.c | 1 + vtysh/vtysh_main.c | 1 + watchfrr/watchfrr.c | 2 ++ zebra/zebra_mpls_netlink.c | 1 + zebra/zebra_netns_id.c | 1 + 25 files changed, 26 insertions(+), 2 deletions(-) diff --git a/bfdd/control.c b/bfdd/control.c index f435358f33..19888c1402 100644 --- a/bfdd/control.c +++ b/bfdd/control.c @@ -11,6 +11,7 @@ */ #include +#include #include diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index 529713ee32..53b5212482 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -4,6 +4,7 @@ */ #include +#include #include "log.h" #include "stream.h" diff --git a/ldpd/control.c b/ldpd/control.c index db52d46325..a08ce4cc1a 100644 --- a/ldpd/control.c +++ b/ldpd/control.c @@ -6,6 +6,7 @@ */ #include +#include #include #include "ldpd.h" diff --git a/lib/command.c b/lib/command.c index b33998839b..3881829e22 100644 --- a/lib/command.c +++ b/lib/command.c @@ -11,6 +11,7 @@ #include #include +#include #include #include "command.h" diff --git a/lib/libfrr.c b/lib/libfrr.c index e80355f3b8..bbef14378d 100644 --- a/lib/libfrr.c +++ b/lib/libfrr.c @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/lib/mgmt_msg.c b/lib/mgmt_msg.c index 99d000537c..d9c0d52e41 100644 --- a/lib/mgmt_msg.c +++ b/lib/mgmt_msg.c @@ -7,6 +7,8 @@ * Copyright (c) 2023, LabN Consulting, L.L.C. */ #include +#include + #include "debug.h" #include "network.h" #include "sockopt.h" diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c index 20f030e280..92d4ffb2ba 100644 --- a/lib/northbound_cli.c +++ b/lib/northbound_cli.c @@ -5,6 +5,7 @@ */ #include +#include #include "libfrr.h" #include "lib/version.h" diff --git a/lib/pid_output.c b/lib/pid_output.c index 064a7bb47f..ce1b7d1969 100644 --- a/lib/pid_output.c +++ b/lib/pid_output.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include "lib/version.h" diff --git a/lib/systemd.c b/lib/systemd.c index 56a53a6e78..a82c376cfd 100644 --- a/lib/systemd.c +++ b/lib/systemd.c @@ -5,6 +5,7 @@ */ #include +#include #include #include "frrevent.h" diff --git a/lib/vty.c b/lib/vty.c index a08a3c8735..e068c5bf0c 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -5,7 +5,7 @@ */ #include - +#include #include #include #include diff --git a/lib/zebra.h b/lib/zebra.h index 07cfc4492c..2a92c76f39 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -25,7 +25,6 @@ #ifdef HAVE_STROPTS_H #include #endif /* HAVE_STROPTS_H */ -#include #include #include #ifdef HAVE_SYS_SYSCTL_H diff --git a/lib/zlog.c b/lib/zlog.c index 446bdd7021..3d7bd9ddf5 100644 --- a/lib/zlog.c +++ b/lib/zlog.c @@ -4,6 +4,7 @@ */ #include "zebra.h" +#include #ifdef HAVE_GLIBC_BACKTRACE #include diff --git a/ospf6d/ospf6_auth_trailer.c b/ospf6d/ospf6_auth_trailer.c index 82671eef77..54b951654a 100644 --- a/ospf6d/ospf6_auth_trailer.c +++ b/ospf6d/ospf6_auth_trailer.c @@ -4,6 +4,7 @@ */ #include "zebra.h" +#include #ifdef CRYPTO_OPENSSL #include diff --git a/ospfd/ospf_auth.c b/ospfd/ospf_auth.c index 74dc7d556b..2b090dca1e 100644 --- a/ospfd/ospf_auth.c +++ b/ospfd/ospf_auth.c @@ -5,6 +5,7 @@ */ #include +#include #ifdef CRYPTO_OPENSSL #include diff --git a/tests/helpers/c/main.c b/tests/helpers/c/main.c index 8af53a2ea4..fdda7f1e2a 100644 --- a/tests/helpers/c/main.c +++ b/tests/helpers/c/main.c @@ -3,6 +3,7 @@ */ #include +#include #include #include "getopt.h" diff --git a/tests/isisd/test_isis_spf.c b/tests/isisd/test_isis_spf.c index 6eb180b501..95f045c90d 100644 --- a/tests/isisd/test_isis_spf.c +++ b/tests/isisd/test_isis_spf.c @@ -5,6 +5,7 @@ */ #include +#include #include #include "getopt.h" diff --git a/tests/lib/cli/common_cli.c b/tests/lib/cli/common_cli.c index e0981b991a..f9f584f450 100644 --- a/tests/lib/cli/common_cli.c +++ b/tests/lib/cli/common_cli.c @@ -7,6 +7,7 @@ */ #include +#include #include "frrevent.h" #include "vty.h" diff --git a/tests/lib/northbound/test_oper_data.c b/tests/lib/northbound/test_oper_data.c index f82eddd3bf..9ac75da4fe 100644 --- a/tests/lib/northbound/test_oper_data.c +++ b/tests/lib/northbound/test_oper_data.c @@ -5,6 +5,7 @@ */ #include +#include #include "frrevent.h" #include "vty.h" diff --git a/tests/lib/test_privs.c b/tests/lib/test_privs.c index e26754857b..caf55c718f 100644 --- a/tests/lib/test_privs.c +++ b/tests/lib/test_privs.c @@ -3,6 +3,7 @@ */ #include +#include #include #include "getopt.h" diff --git a/tests/ospfd/test_ospf_spf.c b/tests/ospfd/test_ospf_spf.c index fc6b8e89ec..932763100b 100644 --- a/tests/ospfd/test_ospf_spf.c +++ b/tests/ospfd/test_ospf_spf.c @@ -1,4 +1,5 @@ #include +#include #include "getopt.h" #include "frrevent.h" diff --git a/tools/gen_northbound_callbacks.c b/tools/gen_northbound_callbacks.c index 5b778a1585..993aa34209 100644 --- a/tools/gen_northbound_callbacks.c +++ b/tools/gen_northbound_callbacks.c @@ -7,6 +7,7 @@ #define REALLY_NEED_PLAIN_GETOPT 1 #include +#include #include diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index c57e8c7997..58b1ded23e 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -5,6 +5,7 @@ #include +#include #include #include #include diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c index 73a033170c..6c4fcc3d6d 100644 --- a/watchfrr/watchfrr.c +++ b/watchfrr/watchfrr.c @@ -6,6 +6,8 @@ */ #include +#include + #include "frrevent.h" #include #include diff --git a/zebra/zebra_mpls_netlink.c b/zebra/zebra_mpls_netlink.c index b76640743e..f0f2c4b7a3 100644 --- a/zebra/zebra_mpls_netlink.c +++ b/zebra/zebra_mpls_netlink.c @@ -4,6 +4,7 @@ */ #include +#include #ifdef HAVE_NETLINK diff --git a/zebra/zebra_netns_id.c b/zebra/zebra_netns_id.c index ae8f9d9a8d..a37d8b41d6 100644 --- a/zebra/zebra_netns_id.c +++ b/zebra/zebra_netns_id.c @@ -5,6 +5,7 @@ */ #include +#include #ifdef GNU_LINUX #include From 7f3d9ea47d0d99b9f14ba23dc5d8678963a586f1 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 4 Jan 2024 16:09:47 -0500 Subject: [PATCH 03/11] lib: remove net/route.h it is not used Signed-off-by: Donald Sharp --- lib/sockunion.h | 1 + lib/zebra.h | 2 -- zebra/if_sysctl.c | 2 ++ zebra/kernel_socket.c | 2 ++ zebra/rt_socket.c | 2 ++ zebra/rtread_sysctl.c | 2 ++ 6 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/sockunion.h b/lib/sockunion.h index 675855e2b6..146651225c 100644 --- a/lib/sockunion.h +++ b/lib/sockunion.h @@ -13,6 +13,7 @@ #include "if.h" #include #ifdef __OpenBSD__ +#include #include #endif diff --git a/lib/zebra.h b/lib/zebra.h index 2a92c76f39..326d3eb217 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -90,8 +90,6 @@ #include #endif /* HAVE_NET_IF_VAR_H */ -#include - #ifndef HAVE_NETLINK #define RT_TABLE_MAIN 0 #define RT_TABLE_LOCAL RT_TABLE_MAIN diff --git a/zebra/if_sysctl.c b/zebra/if_sysctl.c index ae292689ed..9db959896e 100644 --- a/zebra/if_sysctl.c +++ b/zebra/if_sysctl.c @@ -6,6 +6,8 @@ #include +#include + #if !defined(GNU_LINUX) && !defined(OPEN_BSD) #include "if.h" diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index b90be76e46..d50e7de229 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -5,6 +5,8 @@ #include +#include + #ifndef HAVE_NETLINK #include diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c index f9888b12d4..0bfcd518ca 100644 --- a/zebra/rt_socket.c +++ b/zebra/rt_socket.c @@ -6,6 +6,8 @@ #include +#include + #ifndef HAVE_NETLINK #ifdef __OpenBSD__ diff --git a/zebra/rtread_sysctl.c b/zebra/rtread_sysctl.c index ef1e21b4f7..8e2d13faff 100644 --- a/zebra/rtread_sysctl.c +++ b/zebra/rtread_sysctl.c @@ -6,6 +6,8 @@ #include +#include + #if !defined(GNU_LINUX) #include "memory.h" From 33744ae4fca311840cd2971fac433f2b6b2aadd5 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 4 Jan 2024 16:13:02 -0500 Subject: [PATCH 04/11] lib: zebra.h was including compiler.h two times Signed-off-by: Donald Sharp --- lib/zebra.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/zebra.h b/lib/zebra.h index 326d3eb217..6a83975641 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -118,7 +118,6 @@ #include #endif /* HAVE_NETINET6_IN_H */ - #ifdef HAVE_NETINET6_IP6_H #include #endif /* HAVE_NETINET6_IP6_H */ @@ -232,12 +231,6 @@ struct in_pktinfo { /* default zebra TCP port for zclient */ #define ZEBRA_PORT 2600 -/* - * The compiler.h header is used for anyone using the CPP_NOTICE - * since this is universally needed, let's add it to zebra.h - */ -#include "compiler.h" - /* Zebra route's types are defined in route_types.h */ #include "lib/route_types.h" From c6d94a705604c06f2241e2525bc2fbc2ee83bc80 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 4 Jan 2024 16:22:05 -0500 Subject: [PATCH 05/11] *: zebra.h should not have fcntl.h Signed-off-by: Donald Sharp --- babeld/babel_main.c | 2 ++ babeld/kernel.c | 1 + bfdd/control.c | 2 ++ bgpd/bgp_btoa.c | 1 + isisd/isis_bpf.c | 3 +++ ldpd/ldpd.c | 2 ++ ldpd/socket.c | 1 + lib/agentx.c | 1 + lib/command.c | 2 ++ lib/libfrr.c | 1 + lib/netns_linux.c | 1 + lib/network.c | 1 + lib/vty.c | 2 ++ lib/zebra.h | 1 - lib/zlog.c | 1 + lib/zlog_5424.c | 1 + lib/zlog_targets.c | 1 + nhrpd/linux.c | 1 + nhrpd/vici.c | 1 + pimd/pim_sock.c | 1 + tests/bgpd/test_packet.c | 1 + watchfrr/watchfrr.c | 1 + zebra/kernel_netlink.c | 1 + zebra/netconf_netlink.c | 1 + zebra/zebra_netns_id.c | 1 + zebra/zebra_netns_notify.c | 1 + 26 files changed, 32 insertions(+), 1 deletion(-) diff --git a/babeld/babel_main.c b/babeld/babel_main.c index c751e49651..7122d6953b 100644 --- a/babeld/babel_main.c +++ b/babeld/babel_main.c @@ -5,6 +5,8 @@ Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek /* include zebra library */ #include +#include + #include "getopt.h" #include "if.h" #include "log.h" diff --git a/babeld/kernel.c b/babeld/kernel.c index 4fe5bcfea6..aed6dc9c4f 100644 --- a/babeld/kernel.c +++ b/babeld/kernel.c @@ -11,6 +11,7 @@ Copyright 2011, 2012 by Matthieu Boutier and Juliusz Chroboczek #include #include #include +#include #include "babeld.h" diff --git a/bfdd/control.c b/bfdd/control.c index 19888c1402..6ff86f2913 100644 --- a/bfdd/control.c +++ b/bfdd/control.c @@ -11,6 +11,8 @@ */ #include + +#include #include #include diff --git a/bgpd/bgp_btoa.c b/bgpd/bgp_btoa.c index 8e27d9769f..1d5034efd2 100644 --- a/bgpd/bgp_btoa.c +++ b/bgpd/bgp_btoa.c @@ -4,6 +4,7 @@ */ #include +#include #include "zebra.h" #include "stream.h" diff --git a/isisd/isis_bpf.c b/isisd/isis_bpf.c index 96d629124d..47f51a7548 100644 --- a/isisd/isis_bpf.c +++ b/isisd/isis_bpf.c @@ -8,6 +8,9 @@ */ #include + +#include + #if ISIS_METHOD == ISIS_METHOD_BPF #include #include diff --git a/ldpd/ldpd.c b/ldpd/ldpd.c index 3c616d4a8c..621f0c9a43 100644 --- a/ldpd/ldpd.c +++ b/ldpd/ldpd.c @@ -9,6 +9,8 @@ */ #include + +#include #include #include "ldpd.h" diff --git a/ldpd/socket.c b/ldpd/socket.c index 6b7e475d7f..71d5c21753 100644 --- a/ldpd/socket.c +++ b/ldpd/socket.c @@ -9,6 +9,7 @@ */ #include +#include #include "ldpd.h" #include "ldpe.h" diff --git a/lib/agentx.c b/lib/agentx.c index 45f14c2703..9507d6d81f 100644 --- a/lib/agentx.c +++ b/lib/agentx.c @@ -4,6 +4,7 @@ */ #include +#include #ifdef SNMP_AGENTX #include diff --git a/lib/command.c b/lib/command.c index 3881829e22..becba8452b 100644 --- a/lib/command.c +++ b/lib/command.c @@ -12,6 +12,8 @@ #include #include #include +#include + #include #include "command.h" diff --git a/lib/libfrr.c b/lib/libfrr.c index bbef14378d..4cc04babe9 100644 --- a/lib/libfrr.c +++ b/lib/libfrr.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/lib/netns_linux.c b/lib/netns_linux.c index bebb5c1f77..8fa4bc6fe0 100644 --- a/lib/netns_linux.c +++ b/lib/netns_linux.c @@ -5,6 +5,7 @@ */ #include +#include #ifdef HAVE_NETNS #undef _GNU_SOURCE diff --git a/lib/network.c b/lib/network.c index af1c7db443..b768693889 100644 --- a/lib/network.c +++ b/lib/network.c @@ -5,6 +5,7 @@ */ #include +#include #include "log.h" #include "network.h" #include "lib_errors.h" diff --git a/lib/vty.c b/lib/vty.c index e068c5bf0c..244022f1fb 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -5,6 +5,8 @@ */ #include + +#include #include #include #include diff --git a/lib/zebra.h b/lib/zebra.h index 6a83975641..f1a0d25813 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/lib/zlog.c b/lib/zlog.c index 3d7bd9ddf5..77592c33ff 100644 --- a/lib/zlog.c +++ b/lib/zlog.c @@ -5,6 +5,7 @@ #include "zebra.h" #include +#include #ifdef HAVE_GLIBC_BACKTRACE #include diff --git a/lib/zlog_5424.c b/lib/zlog_5424.c index 2158a71360..4c60d4b405 100644 --- a/lib/zlog_5424.c +++ b/lib/zlog_5424.c @@ -13,6 +13,7 @@ */ #include "zebra.h" +#include #include "frrsendmmsg.h" diff --git a/lib/zlog_targets.c b/lib/zlog_targets.c index b0f7571492..bbd228f28c 100644 --- a/lib/zlog_targets.c +++ b/lib/zlog_targets.c @@ -5,6 +5,7 @@ #include "zebra.h" +#include #include #include diff --git a/nhrpd/linux.c b/nhrpd/linux.c index 2a255c435c..b25df9ff2f 100644 --- a/nhrpd/linux.c +++ b/nhrpd/linux.c @@ -5,6 +5,7 @@ #include "zebra.h" +#include #include #include #include diff --git a/nhrpd/vici.c b/nhrpd/vici.c index 2f76362603..8162ac06a6 100644 --- a/nhrpd/vici.c +++ b/nhrpd/vici.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "frrevent.h" #include "zbuf.h" diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c index 6c65c5d3e9..3476c177b7 100644 --- a/pimd/pim_sock.c +++ b/pimd/pim_sock.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/tests/bgpd/test_packet.c b/tests/bgpd/test_packet.c index a83276be07..e050fd4c71 100644 --- a/tests/bgpd/test_packet.c +++ b/tests/bgpd/test_packet.c @@ -7,6 +7,7 @@ */ #include +#include #include "qobj.h" #include "vty.h" diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c index 6c4fcc3d6d..406765a781 100644 --- a/watchfrr/watchfrr.c +++ b/watchfrr/watchfrr.c @@ -7,6 +7,7 @@ #include #include +#include #include "frrevent.h" #include diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index a05f2d3edc..8a64a1ea48 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -4,6 +4,7 @@ */ #include +#include #ifdef HAVE_NETLINK #include diff --git a/zebra/netconf_netlink.c b/zebra/netconf_netlink.c index 9a0b3c5d0c..002d2c7bf6 100644 --- a/zebra/netconf_netlink.c +++ b/zebra/netconf_netlink.c @@ -6,6 +6,7 @@ * Donald Sharp */ #include +#include #ifdef HAVE_NETLINK /* Netlink OSes only */ diff --git a/zebra/zebra_netns_id.c b/zebra/zebra_netns_id.c index a37d8b41d6..1af3a3e857 100644 --- a/zebra/zebra_netns_id.c +++ b/zebra/zebra_netns_id.c @@ -6,6 +6,7 @@ #include #include +#include #ifdef GNU_LINUX #include diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c index 4260d29c43..1bb1292e34 100644 --- a/zebra/zebra_netns_notify.c +++ b/zebra/zebra_netns_notify.c @@ -5,6 +5,7 @@ */ #include +#include #ifdef HAVE_NETLINK #ifdef HAVE_NETNS From b6f1a4089fc88a343856ae5ce8667f43c7b37ba2 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 4 Jan 2024 16:25:09 -0500 Subject: [PATCH 06/11] lib: zebra.h uses pwd.h when it should not Signed-off-by: Donald Sharp --- lib/privs.c | 1 + lib/zebra.h | 1 - vtysh/vtysh.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/privs.c b/lib/privs.c index ef4a0adf04..717a2e48d6 100644 --- a/lib/privs.c +++ b/lib/privs.c @@ -7,6 +7,7 @@ */ #include +#include #include #ifdef HAVE_LCAPS diff --git a/lib/zebra.h b/lib/zebra.h index f1a0d25813..e38dba0deb 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -20,7 +20,6 @@ #include #include #include -#include #ifdef HAVE_STROPTS_H #include #endif /* HAVE_STROPTS_H */ diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index e6ab22450f..2888403e62 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -5,6 +5,7 @@ #include +#include #include #include From 8049f74fc638929b6e134b3f757d980d3559b226 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 5 Jan 2024 09:36:09 -0500 Subject: [PATCH 07/11] lib: zebra.h is not using signal.h Signed-off-by: Donald Sharp --- ldpd/ldpd.c | 1 + lib/event.c | 2 ++ lib/frr_pthread.c | 3 +++ lib/libfrr.c | 2 ++ lib/sigevent.c | 2 ++ lib/zebra.h | 1 - vtysh/vtysh_main.c | 1 + watchfrr/watchfrr.c | 2 ++ watchfrr/watchfrr_vty.c | 2 ++ 9 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ldpd/ldpd.c b/ldpd/ldpd.c index 621f0c9a43..a4d45d9c8d 100644 --- a/ldpd/ldpd.c +++ b/ldpd/ldpd.c @@ -10,6 +10,7 @@ #include +#include #include #include diff --git a/lib/event.c b/lib/event.c index 3ca27f6d8c..a7851f6983 100644 --- a/lib/event.c +++ b/lib/event.c @@ -6,6 +6,8 @@ /* #define DEBUG */ #include + +#include #include #include "frrevent.h" diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c index c4ead01bf6..761969266a 100644 --- a/lib/frr_pthread.c +++ b/lib/frr_pthread.c @@ -5,6 +5,9 @@ */ #include + +#include + #include #ifdef HAVE_PTHREAD_NP_H #include diff --git a/lib/libfrr.c b/lib/libfrr.c index 4cc04babe9..d38b4ec4c0 100644 --- a/lib/libfrr.c +++ b/lib/libfrr.c @@ -6,6 +6,8 @@ */ #include + +#include #include #include #include diff --git a/lib/sigevent.c b/lib/sigevent.c index 3cd65eb800..06f80db4cc 100644 --- a/lib/sigevent.c +++ b/lib/sigevent.c @@ -4,6 +4,8 @@ */ #include + +#include #include #include #include diff --git a/lib/zebra.h b/lib/zebra.h index e38dba0deb..339b832e9d 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #ifdef HAVE_STROPTS_H #include diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index 58b1ded23e..6065776f11 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -5,6 +5,7 @@ #include +#include #include #include #include diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c index 406765a781..707e01f4ef 100644 --- a/watchfrr/watchfrr.c +++ b/watchfrr/watchfrr.c @@ -6,6 +6,8 @@ */ #include + +#include #include #include diff --git a/watchfrr/watchfrr_vty.c b/watchfrr/watchfrr_vty.c index 3afc76761d..0547c1e8b3 100644 --- a/watchfrr/watchfrr_vty.c +++ b/watchfrr/watchfrr_vty.c @@ -6,6 +6,8 @@ */ #include + +#include #include #include "memory.h" From 68eca30c58edf0ff13c4456e37074975a27a4b11 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 5 Jan 2024 09:45:44 -0500 Subject: [PATCH 08/11] lib: stdbool.h is not being used by zebra.h Signed-off-by: Donald Sharp --- lib/zebra.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/zebra.h b/lib/zebra.h index 339b832e9d..9907c6dde9 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -41,7 +41,6 @@ #include #include #include -#include #ifdef HAVE_SYS_ENDIAN_H #include #endif From 7c1a8f7a9e1c1253d052d74f5f6cb7f7a067b7d9 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 5 Jan 2024 09:50:16 -0500 Subject: [PATCH 09/11] lib: string.h was only used by vector.c make it better Signed-off-by: Donald Sharp --- lib/vector.c | 1 + lib/zebra.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vector.c b/lib/vector.c index bbea67c12f..60d383101a 100644 --- a/lib/vector.c +++ b/lib/vector.c @@ -4,6 +4,7 @@ */ #include +#include #include "vector.h" #include "memory.h" diff --git a/lib/zebra.h b/lib/zebra.h index 9907c6dde9..0a2f548741 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -18,7 +18,6 @@ #include #include #include -#include #ifdef HAVE_STROPTS_H #include #endif /* HAVE_STROPTS_H */ From f982bddebd34afdc25776d9d84f0c22689e322d9 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 5 Jan 2024 09:59:40 -0500 Subject: [PATCH 10/11] zebra: Nothing is using errno.h Signed-off-by: Donald Sharp --- lib/zebra.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/zebra.h b/lib/zebra.h index 0a2f548741..1677c1d1a1 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -17,7 +17,6 @@ #include #include #include -#include #ifdef HAVE_STROPTS_H #include #endif /* HAVE_STROPTS_H */ From c402a0bdc1c5bfaa9b222fb213315ebd2ff7bff3 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 5 Jan 2024 10:01:11 -0500 Subject: [PATCH 11/11] lib: limits.h is not needed by zebra.h Signed-off-by: Donald Sharp --- lib/zebra.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/zebra.h b/lib/zebra.h index 1677c1d1a1..8b0800c257 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -37,7 +37,6 @@ #endif /* HAVE_SYS_KSYM_H */ #include #include -#include #include #ifdef HAVE_SYS_ENDIAN_H #include