From: Lennart Poettering Date: Wed, 10 Jan 2018 19:08:18 +0000 (+0100) Subject: sd-netlink: let's make things compile on certain old glibc's and kernel headers again... X-Git-Tag: v237~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a2dadf1bbf4c7c0b04dddee98a3a6b2a053f868;p=thirdparty%2Fsystemd.git sd-netlink: let's make things compile on certain old glibc's and kernel headers again (#7848) Let's include netinet/in.h instead of linux/in6.h, as the former is the official libc location for these definitions, and the latter is a linux-specific version that conflicts. This hopefully makes systemd compile on current Semaphore again. This takes e410b07d2aa64a653bc0e93b77856af41297b84d into consideration, but makes us use glibc rather than kernel headers. While we are at it, let's also sort our #include lines. Since kernel headers are notoriously crappy we won't strictly order them globally, but first include non-kernel headers in a sorted way, and then include kernel headers in a somewhat sorted way (i.e. generic stuff first and somewhat alphabetical, and specific stuff last) --- diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c index 718aa74f158..65af5cd43d1 100644 --- a/src/libsystemd/sd-netlink/netlink-types.c +++ b/src/libsystemd/sd-netlink/netlink-types.c @@ -18,26 +18,22 @@ along with systemd; If not, see . ***/ +#include #include #include #include #include +#include +#include +#include #include #include -#include -#include -#include #include #include -#include -#include -#include #include #include #include -#include -#include - +#include #if HAVE_VXCAN_INFO_PEER #include #endif @@ -45,10 +41,10 @@ #include "macro.h" #include "missing.h" #include "netlink-types.h" +#include "sd-netlink.h" #include "string-table.h" #include "util.h" #include "wireguard-netlink.h" -#include "sd-netlink.h" /* Maximum ARP IP target defined in kernel */ #define BOND_MAX_ARP_TARGETS 16