diff options
author | Thomas Haller <thaller@redhat.com> | 2020-12-13 16:08:56 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-12-22 16:33:33 +0100 |
commit | 0fca809bfddd42f779e49dd5181f089c20e93320 (patch) | |
tree | 8303596f5a706e18dc8b252fb13c58efe1478702 /libnm | |
parent | e711aa1423ecd48e7913812464c2105a24673370 (diff) | |
download | NetworkManager-0fca809bfddd42f779e49dd5181f089c20e93320.tar.gz |
all: explicit include <linux/if_{ether,infiniband,vlan}.h> as needed
Currently libnm headers include <linux/if_{ether,infiniband,vlan}.h>.
These are public headers, that means we drag in the linux header to all
users of <NetworkManager.h>.
Often the linux headers work badly together with certain headers from libc.
Depending on the libc version, you have to order linux headers in the right
order with respect to libc headers.
We should do better about libnm headers. As a first step, assume that
the linux headers don't get included by libnm, and explicitly include
them where they are needed.
Diffstat (limited to 'libnm')
-rw-r--r-- | libnm/nm-access-point.c | 2 | ||||
-rw-r--r-- | libnm/nm-device-bt.c | 2 | ||||
-rw-r--r-- | libnm/nm-device-ethernet.c | 2 | ||||
-rw-r--r-- | libnm/nm-device-infiniband.c | 2 | ||||
-rw-r--r-- | libnm/nm-device-wifi.c | 2 |
5 files changed, 10 insertions, 0 deletions
diff --git a/libnm/nm-access-point.c b/libnm/nm-access-point.c index 25ce44a134..c46f68d299 100644 --- a/libnm/nm-access-point.c +++ b/libnm/nm-access-point.c @@ -8,6 +8,8 @@ #include "nm-access-point.h" +#include <linux/if_ether.h> + #include "nm-connection.h" #include "nm-setting-connection.h" #include "nm-setting-wireless.h" diff --git a/libnm/nm-device-bt.c b/libnm/nm-device-bt.c index ef6cc869f0..e8bbe69f41 100644 --- a/libnm/nm-device-bt.c +++ b/libnm/nm-device-bt.c @@ -8,6 +8,8 @@ #include "nm-device-bt.h" +#include <linux/if_ether.h> + #include "nm-setting-connection.h" #include "nm-setting-bluetooth.h" #include "nm-utils.h" diff --git a/libnm/nm-device-ethernet.c b/libnm/nm-device-ethernet.c index 6513e7b7da..52cc39f9da 100644 --- a/libnm/nm-device-ethernet.c +++ b/libnm/nm-device-ethernet.c @@ -8,6 +8,8 @@ #include "nm-device-ethernet.h" +#include <linux/if_ether.h> + #include "nm-libnm-utils.h" #include "nm-setting-connection.h" #include "nm-setting-wired.h" diff --git a/libnm/nm-device-infiniband.c b/libnm/nm-device-infiniband.c index f254ecef87..21834dc1af 100644 --- a/libnm/nm-device-infiniband.c +++ b/libnm/nm-device-infiniband.c @@ -7,6 +7,8 @@ #include "nm-device-infiniband.h" +#include <linux/if_infiniband.h> + #include "nm-setting-connection.h" #include "nm-setting-infiniband.h" #include "nm-utils.h" diff --git a/libnm/nm-device-wifi.c b/libnm/nm-device-wifi.c index df7d26316d..f76b98d7f8 100644 --- a/libnm/nm-device-wifi.c +++ b/libnm/nm-device-wifi.c @@ -8,6 +8,8 @@ #include "nm-device-wifi.h" +#include <linux/if_ether.h> + #include "nm-glib-aux/nm-dbus-aux.h" #include "nm-setting-connection.h" #include "nm-setting-wireless.h" |