summaryrefslogtreecommitdiff
path: root/src/platform/nm-linux-platform.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-12-22 16:47:51 +0100
committerThomas Haller <thaller@redhat.com>2020-12-23 10:48:26 +0100
commitc50da167bc8a70f18edc786591131e77bcfd8468 (patch)
tree81a59a7b88e4b679dda79d4b856685446b946a5c /src/platform/nm-linux-platform.c
parent44e25bbb961d17508c91fd195563ec670a8e337c (diff)
downloadNetworkManager-c50da167bc8a70f18edc786591131e77bcfd8468.tar.gz
all: adjust imports to fix libc/linux headers
Linux headers and some libc headers have overlapping defines for network types and functions. In the past years, glibc and linux headers were improved to cooperate so you could include either one, in any order. With musl and possibly some older glibc versions that doesn't work so well. Reorder and change includes to make it work better. Yes, this looks pretty random and unmotivated. The includes are changed in order to successfully build on various libc/kernel versions, with the goal of not using #if.
Diffstat (limited to 'src/platform/nm-linux-platform.c')
-rw-r--r--src/platform/nm-linux-platform.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 28e6df1c6b..505cf82cb6 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -12,9 +12,10 @@
#include <endian.h>
#include <fcntl.h>
#include <libudev.h>
+#include <net/ethernet.h>
#include <linux/fib_rules.h>
#include <linux/ip.h>
-#include <linux/if_arp.h>
+#include <linux/if.h>
#include <linux/if_bridge.h>
#include <linux/if_link.h>
#include <linux/if_tun.h>
@@ -24,6 +25,7 @@
#include <linux/tc_act/tc_mirred.h>
#include <netinet/icmp6.h>
#include <netinet/in.h>
+#include <net/if_arp.h>
#include <poll.h>
#include <sys/ioctl.h>
#include <sys/socket.h>