From 634f0f983c57e41292dd36c7327e99316ff61aa3 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Thu, 28 Apr 2016 22:52:04 -0400 Subject: networkd: rework headers to avoid circular includes Header files were organized in a way where the includer would add various typedefs used by the includee before including it, resulting in a tangled web of dependencies between files. Replace this with the following logic: networkd.h / \ networkd-link.h \ networkd-ipv4ll.h--\__\ networkd-fdb.h \ networkd-network.h netword-netdev-*.h networkd-route.h \ networkd-netdev.h If a pointer to a structure defined in a different header file is needed, use a typedef line instead of including the whole header. --- src/network/networkd-lldp-tx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/network/networkd-lldp-tx.c') diff --git a/src/network/networkd-lldp-tx.c b/src/network/networkd-lldp-tx.c index 6bde04bc32..03b694c3f1 100644 --- a/src/network/networkd-lldp-tx.c +++ b/src/network/networkd-lldp-tx.c @@ -21,15 +21,18 @@ #include #include +#include "alloc-util.h" #include "fd-util.h" #include "fileio.h" #include "hostname-util.h" -#include "networkd-lldp-tx.h" #include "random-util.h" #include "socket-util.h" #include "string-util.h" #include "unaligned.h" +#include "networkd.h" +#include "networkd-lldp-tx.h" + #define LLDP_MULTICAST_ADDR { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x0e } /* The LLDP spec calls this "txFastInit", see 9.2.5.19 */ -- cgit v1.2.3-54-g00ecf