diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-28 22:52:04 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-29 19:01:28 -0400 |
commit | 634f0f983c57e41292dd36c7327e99316ff61aa3 (patch) | |
tree | 3001bda48db13713279ac42ca1650fc49cdaecda /src/network/networkd-netdev-tuntap.c | |
parent | 26ccc1d0875b0e0c4306b03a52aff712c23d46c7 (diff) |
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.
Diffstat (limited to 'src/network/networkd-netdev-tuntap.c')
-rw-r--r-- | src/network/networkd-netdev-tuntap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/network/networkd-netdev-tuntap.c b/src/network/networkd-netdev-tuntap.c index 32917fe6d5..088a4d8d32 100644 --- a/src/network/networkd-netdev-tuntap.c +++ b/src/network/networkd-netdev-tuntap.c @@ -17,10 +17,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <net/if.h> -#include <sys/ioctl.h> +#include <fcntl.h> #include <linux/if_tun.h> +#include <net/if.h> #include <netinet/if_ether.h> +#include <sys/ioctl.h> +#include <sys/stat.h> +#include <sys/types.h> #include "alloc-util.h" #include "fd-util.h" |