summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-01-04 16:22:05 -0500
committerDonald Sharp <sharpd@nvidia.com>2024-01-09 12:50:40 -0500
commitc6d94a705604c06f2241e2525bc2fbc2ee83bc80 (patch)
tree1115644d88fbc557f3661e591d2a7cbf5d2e5193
parent33744ae4fca311840cd2971fac433f2b6b2aadd5 (diff)
*: zebra.h should not have fcntl.h
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--babeld/babel_main.c2
-rw-r--r--babeld/kernel.c1
-rw-r--r--bfdd/control.c2
-rw-r--r--bgpd/bgp_btoa.c1
-rw-r--r--isisd/isis_bpf.c3
-rw-r--r--ldpd/ldpd.c2
-rw-r--r--ldpd/socket.c1
-rw-r--r--lib/agentx.c1
-rw-r--r--lib/command.c2
-rw-r--r--lib/libfrr.c1
-rw-r--r--lib/netns_linux.c1
-rw-r--r--lib/network.c1
-rw-r--r--lib/vty.c2
-rw-r--r--lib/zebra.h1
-rw-r--r--lib/zlog.c1
-rw-r--r--lib/zlog_5424.c1
-rw-r--r--lib/zlog_targets.c1
-rw-r--r--nhrpd/linux.c1
-rw-r--r--nhrpd/vici.c1
-rw-r--r--pimd/pim_sock.c1
-rw-r--r--tests/bgpd/test_packet.c1
-rw-r--r--watchfrr/watchfrr.c1
-rw-r--r--zebra/kernel_netlink.c1
-rw-r--r--zebra/netconf_netlink.c1
-rw-r--r--zebra/zebra_netns_id.c1
-rw-r--r--zebra/zebra_netns_notify.c1
26 files changed, 32 insertions, 1 deletions
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 <zebra.h>
+#include <fcntl.h>
+
#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 <sys/time.h>
#include <sys/param.h>
#include <time.h>
+#include <fcntl.h>
#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 <zebra.h>
+
+#include <fcntl.h>
#include <sys/stat.h>
#include <sys/un.h>
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 <zebra.h>
+#include <fcntl.h>
#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 <zebra.h>
+
+#include <fcntl.h>
+
#if ISIS_METHOD == ISIS_METHOD_BPF
#include <net/if.h>
#include <netinet/if_ether.h>
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 <zebra.h>
+
+#include <fcntl.h>
#include <sys/wait.h>
#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 <zebra.h>
+#include <fcntl.h>
#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 <zebra.h>
+#include <fcntl.h>
#ifdef SNMP_AGENTX
#include <net-snmp/net-snmp-config.h>
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 <zebra.h>
#include <sys/utsname.h>
#include <sys/stat.h>
+#include <fcntl.h>
+
#include <lib/version.h>
#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 <zebra.h>
#include <sys/stat.h>
#include <sys/un.h>
+#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
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 <zebra.h>
+#include <fcntl.h>
#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 <zebra.h>
+#include <fcntl.h>
#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 <zebra.h>
+
+#include <fcntl.h>
#include <sys/stat.h>
#include <lib/version.h>
#include <sys/types.h>
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 <stddef.h>
#include <ctype.h>
#include <errno.h>
-#include <fcntl.h>
#include <signal.h>
#include <string.h>
#include <pwd.h>
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 <sys/stat.h>
+#include <fcntl.h>
#ifdef HAVE_GLIBC_BACKTRACE
#include <execinfo.h>
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 <fcntl.h>
#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 <fcntl.h>
#include <sys/un.h>
#include <syslog.h>
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 <fcntl.h>
#include <errno.h>
#include <linux/if_packet.h>
#include <sys/ioctl.h>
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 <string.h>
#include <sys/socket.h>
#include <sys/un.h>
+#include <fcntl.h>
#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 <zebra.h>
+#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
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 <zebra.h>
+#include <fcntl.h>
#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 <zebra.h>
#include <sys/stat.h>
+#include <fcntl.h>
#include "frrevent.h"
#include <log.h>
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 <zebra.h>
+#include <fcntl.h>
#ifdef HAVE_NETLINK
#include <linux/netlink.h>
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 <zebra.h>
+#include <fcntl.h>
#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 <zebra.h>
#include <sys/stat.h>
+#include <fcntl.h>
#ifdef GNU_LINUX
#include <linux/if_link.h>
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 <zebra.h>
+#include <fcntl.h>
#ifdef HAVE_NETLINK
#ifdef HAVE_NETNS