From 2af02e61657aa513aa7b6df7fd1a04b13f853cef Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 14 Aug 2023 12:54:40 +0200 Subject: [PATCH] tree-wide: Always include before related linux headers Otherwise, we get redefinition errors if is included later on by another header. --- src/libsystemd-network/sd-dhcp6-client.c | 5 +++-- src/network/networkd-dhcp-server.c | 5 +++-- src/network/networkd-manager.c | 3 ++- src/network/networkd-state-file.c | 3 ++- src/resolve/resolved-link.c | 3 ++- src/udev/net/link-config.c | 3 ++- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index 6d62ba380b..9a4f3ab1bf 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -5,8 +5,9 @@ #include #include -#include -#include +#include +#include /* Must be included after */ +#include /* Must be included after */ #include "sd-dhcp6-client.h" diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c index 8221fd92db..fedc2e4f04 100644 --- a/src/network/networkd-dhcp-server.c +++ b/src/network/networkd-dhcp-server.c @@ -1,8 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include -#include -#include +#include +#include /* Must be included after */ +#include /* Must be included after */ #include "sd-dhcp-server.h" diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index ab5460db27..51434a1abd 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -3,7 +3,8 @@ #include #include #include -#include +#include +#include /* Must be included after */ #include #include #include diff --git a/src/network/networkd-state-file.c b/src/network/networkd-state-file.c index 85c9d21082..e27984d2de 100644 --- a/src/network/networkd-state-file.c +++ b/src/network/networkd-state-file.c @@ -1,7 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include -#include +#include +#include /* Must be included after */ #include "alloc-util.h" #include "dns-domain.h" diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c index dd5daddce4..a60aabb395 100644 --- a/src/resolve/resolved-link.c +++ b/src/resolve/resolved-link.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include +#include +#include /* Must be included after */ #include #include "sd-network.h" diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c index ff8fb24f66..e7b28d33f0 100644 --- a/src/udev/net/link-config.c +++ b/src/udev/net/link-config.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include +#include +#include /* Must be included after */ #include #include