summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-09-08 12:55:48 +0200
committerThomas Haller <thaller@redhat.com>2021-09-08 13:35:33 +0200
commit426491a500e29cfbef6ad7445b895496f1f643fb (patch)
treefa407e82d297968c0cb3e8b4d90b2895449dc155
parent52d18db0e325affb61a1a96ee337989dd776ba71 (diff)
downloadNetworkManager-426491a500e29cfbef6ad7445b895496f1f643fb.tar.gz
platform: fix build using our copy of header "linux-headers/ethtool.h"
Fixes: 34d48d2596f7 ('platform: clear all BASE types when setting advertised modes for ethernet autoneg')
-rw-r--r--src/libnm-platform/nm-platform-utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libnm-platform/nm-platform-utils.c b/src/libnm-platform/nm-platform-utils.c
index bcb2e6bfe4..7a0f48ef70 100644
--- a/src/libnm-platform/nm-platform-utils.c
+++ b/src/libnm-platform/nm-platform-utils.c
@@ -7,6 +7,10 @@
#include "nm-platform-utils.h"
+/* <linux/mii.h> includes <linux/ethtool.h>. We thus need to include
+ * our copy first and violate the common order of includes. */
+#include "linux-headers/ethtool.h"
+
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/sockios.h>
@@ -17,7 +21,6 @@
#include <fcntl.h>
#include <libudev.h>
-#include "linux-headers/ethtool.h"
#include "libnm-base/nm-ethtool-base.h"
#include "libnm-log-core/nm-logging.h"
#include "libnm-glib-aux/nm-time-utils.h"