diff --git a/src/devices/nm-device-infiniband.c b/src/devices/nm-device-infiniband.c index 41fac157dd..5138b68460 100644 --- a/src/devices/nm-device-infiniband.c +++ b/src/devices/nm-device-infiniband.c @@ -22,6 +22,7 @@ #include "nm-device-infiniband.h" +#include #include #include "NetworkManagerUtils.h" diff --git a/src/devices/nm-device-ip-tunnel.c b/src/devices/nm-device-ip-tunnel.c index 568403c626..1c7e6d51e5 100644 --- a/src/devices/nm-device-ip-tunnel.c +++ b/src/devices/nm-device-ip-tunnel.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "nm-device-private.h" #include "nm-manager.h" diff --git a/src/devices/nm-device-macvlan.c b/src/devices/nm-device-macvlan.c index ff386c82ed..2b21215451 100644 --- a/src/devices/nm-device-macvlan.c +++ b/src/devices/nm-device-macvlan.c @@ -23,6 +23,7 @@ #include "nm-device-macvlan.h" #include +#include #include "nm-device-private.h" #include "settings/nm-settings.h" diff --git a/src/devices/nm-device-wpan.c b/src/devices/nm-device-wpan.c index f910b0b899..05b507d585 100644 --- a/src/devices/nm-device-wpan.c +++ b/src/devices/nm-device-wpan.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "nm-act-request.h" #include "nm-device-private.h" diff --git a/src/dhcp/nm-dhcp-dhclient-utils.c b/src/dhcp/nm-dhcp-dhclient-utils.c index 8128b5c8df..be8d06d988 100644 --- a/src/dhcp/nm-dhcp-dhclient-utils.c +++ b/src/dhcp/nm-dhcp-dhclient-utils.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "nm-utils/nm-dedup-multi.h" diff --git a/src/ndisc/nm-ndisc.h b/src/ndisc/nm-ndisc.h index 73eef368ed..6c0c026442 100644 --- a/src/ndisc/nm-ndisc.h +++ b/src/ndisc/nm-ndisc.h @@ -23,6 +23,7 @@ #include #include +#include #include "nm-setting-ip6-config.h" #include "NetworkManagerUtils.h" diff --git a/src/nm-test-utils-core.h b/src/nm-test-utils-core.h index 5e89cb39f1..dbfe71ada3 100644 --- a/src/nm-test-utils-core.h +++ b/src/nm-test-utils-core.h @@ -88,8 +88,8 @@ nmtst_platform_ip4_address_full (const char *address, const char *peer_address, { NMPlatformIP4Address *addr = nmtst_platform_ip4_address (address, peer_address, plen); - G_STATIC_ASSERT (IFNAMSIZ == sizeof (addr->label)); - g_assert (!label || strlen (label) < IFNAMSIZ); + G_STATIC_ASSERT (NMP_IFNAMSIZ == sizeof (addr->label)); + g_assert (!label || strlen (label) < NMP_IFNAMSIZ); addr->ifindex = ifindex; addr->addr_source = source; diff --git a/src/platform/nm-fake-platform.c b/src/platform/nm-fake-platform.c index 82f9e2fb29..ef69b391b7 100644 --- a/src/platform/nm-fake-platform.c +++ b/src/platform/nm-fake-platform.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "nm-utils.h" diff --git a/src/platform/nm-platform-utils.c b/src/platform/nm-platform-utils.c index 216b15478e..cc43b27fbe 100644 --- a/src/platform/nm-platform-utils.c +++ b/src/platform/nm-platform-utils.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 7ddcf41ae5..52ec4fec64 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h index 11495aff4f..f7a23616b2 100644 --- a/src/platform/nm-platform.h +++ b/src/platform/nm-platform.h @@ -21,12 +21,6 @@ #ifndef __NETWORKMANAGER_PLATFORM_H__ #define __NETWORKMANAGER_PLATFORM_H__ -#include -#include -#include -#include -#include - #include "nm-dbus-interface.h" #include "nm-core-types-internal.h" @@ -53,6 +47,12 @@ /*****************************************************************************/ +/* IFNAMSIZ is both defined in and . In the past, these + * headers conflicted, so we cannot simply include either of them in a header-file.*/ +#define NMP_IFNAMSIZ 16 + +/*****************************************************************************/ + struct udev_device; typedef gboolean (*NMPObjectPredicateFunc) (const NMPObject *obj, @@ -208,7 +208,7 @@ typedef enum { struct _NMPlatformLink { __NMPlatformObject_COMMON; - char name[IFNAMSIZ]; + char name[NMP_IFNAMSIZ]; NMLinkType type; /* rtnl_link_get_type(), IFLA_INFO_KIND. */ @@ -355,7 +355,7 @@ struct _NMPlatformIP4Address { * */ in_addr_t peer_address; /* PTP peer address */ - char label[IFNAMSIZ]; + char label[NMP_IFNAMSIZ]; }; /** @@ -1105,12 +1105,12 @@ const char *nm_platform_error_to_string (NMPlatformError error, ((const char *) NULL), -1, (path) #define NMP_SYSCTL_PATHID_NETDIR_unsafe(dirfd, ifname, path) \ - nm_sprintf_bufa (NM_STRLEN ("net:/sys/class/net//\0") + IFNAMSIZ + strlen (path), \ + nm_sprintf_bufa (NM_STRLEN ("net:/sys/class/net//\0") + NMP_IFNAMSIZ + strlen (path), \ "net:/sys/class/net/%s/%s", (ifname), (path)), \ (dirfd), (path) #define NMP_SYSCTL_PATHID_NETDIR(dirfd, ifname, path) \ - nm_sprintf_bufa (NM_STRLEN ("net:/sys/class/net//"path"/\0") + IFNAMSIZ, \ + nm_sprintf_bufa (NM_STRLEN ("net:/sys/class/net//"path"/\0") + NMP_IFNAMSIZ, \ "net:/sys/class/net/%s/%s", (ifname), path), \ (dirfd), (""path"") diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c index fdc27440cc..f7fa6cb3cb 100644 --- a/src/platform/nmp-object.c +++ b/src/platform/nmp-object.c @@ -24,6 +24,7 @@ #include #include +#include #include #include "nm-utils.h" diff --git a/src/platform/tests/test-common.h b/src/platform/tests/test-common.h index 1baadfa116..7e81baeac0 100644 --- a/src/platform/tests/test-common.h +++ b/src/platform/tests/test-common.h @@ -21,6 +21,9 @@ #include #include #include +#include +#include +#include #include "platform/nm-platform.h" #include "platform/nmp-object.h" diff --git a/src/platform/wifi/nm-wifi-utils-nl80211.c b/src/platform/wifi/nm-wifi-utils-nl80211.c index b3bb2bb6e6..39e3f97181 100644 --- a/src/platform/wifi/nm-wifi-utils-nl80211.c +++ b/src/platform/wifi/nm-wifi-utils-nl80211.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "platform/nm-netlink.h" #include "nm-wifi-utils-private.h" diff --git a/src/platform/wpan/nm-wpan-utils.c b/src/platform/wpan/nm-wpan-utils.c index 0544539ac6..882c4eec21 100644 --- a/src/platform/wpan/nm-wpan-utils.c +++ b/src/platform/wpan/nm-wpan-utils.c @@ -21,6 +21,8 @@ #include "nm-wpan-utils.h" +#include + #include "platform/linux/nl802154.h" #include "platform/nm-netlink.h" diff --git a/src/tests/test-ip6-config.c b/src/tests/test-ip6-config.c index a03d89b07b..5b25506835 100644 --- a/src/tests/test-ip6-config.c +++ b/src/tests/test-ip6-config.c @@ -22,6 +22,7 @@ #include #include +#include #include "nm-ip6-config.h"