diff mbox series

[oe,meta-networking] networkmanager: Fix build with musl

Message ID 20181107200637.22770-1-raj.khem@gmail.com
State Accepted
Commit 8a8808315008ae0fc82f357697180ed8a096d250
Headers show
Series [oe,meta-networking] networkmanager: Fix build with musl | expand

Commit Message

Khem Raj Nov. 7, 2018, 8:06 p.m. UTC
Remove redundant header includes

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andreas Müller <schnitzeltony@gmail.com>
---
 ...-net-ethernet.h-and-linux-if_ether.h.patch | 53 +++++++++++++++++++
 .../networkmanager/networkmanager_1.14.4.bb   |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch

Comments

Andreas Müller Nov. 7, 2018, 11:28 p.m. UTC | #1
On Wed, Nov 7, 2018 at 9:06 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> Remove redundant header includes
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Andreas Müller <schnitzeltony@gmail.com>
> ---
>  ...-net-ethernet.h-and-linux-if_ether.h.patch | 53 +++++++++++++++++++
>  .../networkmanager/networkmanager_1.14.4.bb   |  1 +
>  2 files changed, 54 insertions(+)
>  create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch
Hey Khem,

Just did a glibc build/run test: You are right: the includes seem to be useless

Thanks for taking care!

Andreas
diff mbox series

Patch

diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch
new file mode 100644
index 0000000000..0c415bce7e
--- /dev/null
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch
@@ -0,0 +1,53 @@ 
+From 3f4b6319701834182304c4079119780f4ae5b49b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 7 Nov 2018 11:30:44 -0800
+Subject: [PATCH] Do not include net/ethernet.h and linux/if_ether.h
+
+They conflict when used together especially with musl
+removing them still keeps it working so it seems they are redundant
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ shared/n-acd/src/n-acd.c              | 1 -
+ src/platform/wpan/nm-wpan-utils.h     | 2 --
+ src/settings/nm-settings-connection.h | 2 --
+ 3 files changed, 5 deletions(-)
+
+diff --git a/shared/n-acd/src/n-acd.c b/shared/n-acd/src/n-acd.c
+index 9164f95..9538e50 100644
+--- a/shared/n-acd/src/n-acd.c
++++ b/shared/n-acd/src/n-acd.c
+@@ -23,7 +23,6 @@
+ #include <errno.h>
+ #include <limits.h>
+ #include <linux/filter.h>
+-#include <linux/if_ether.h>
+ #include <linux/if_packet.h>
+ #include <net/ethernet.h>
+ #include <netinet/if_ether.h>
+diff --git a/src/platform/wpan/nm-wpan-utils.h b/src/platform/wpan/nm-wpan-utils.h
+index f7d0c03..e1c81f5 100644
+--- a/src/platform/wpan/nm-wpan-utils.h
++++ b/src/platform/wpan/nm-wpan-utils.h
+@@ -20,8 +20,6 @@
+ #ifndef __WPAN_UTILS_H__
+ #define __WPAN_UTILS_H__
+ 
+-#include <net/ethernet.h>
+-
+ #include "nm-dbus-interface.h"
+ #include "platform/nm-netlink.h"
+ 
+diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h
+index e796b71..c01fef6 100644
+--- a/src/settings/nm-settings-connection.h
++++ b/src/settings/nm-settings-connection.h
+@@ -22,8 +22,6 @@
+ #ifndef __NETWORKMANAGER_SETTINGS_CONNECTION_H__
+ #define __NETWORKMANAGER_SETTINGS_CONNECTION_H__
+ 
+-#include <net/ethernet.h>
+-
+ #include "nm-dbus-object.h"
+ #include "nm-connection.h"
+ 
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.14.4.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.14.4.bb
index 3ce2a2f89d..348ce9e7a2 100644
--- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.14.4.bb
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.14.4.bb
@@ -28,6 +28,7 @@  SRC_URI = " \
     file://0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \
     file://0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \
     file://0003-Do-not-create-settings-settings-property-documentati.patch \
+    file://0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch \
     file://musl/0001-musl-basic.patch \
     file://musl/0002-musl-dlopen-configure-ac.patch \
     file://musl/0003-musl-network-support.patch \