From b82eb00865603139ba4e02cb68c476d0912ae81b Mon Sep 17 00:00:00 2001 From: Juergen Buchmueller Date: Tue, 1 Nov 2016 03:08:57 +0100 Subject: [PATCH] NetworkManager: better fix for musl (aarch64) --- srcpkgs/NetworkManager/patches/musl.patch | 43 ++++++++++++++++++----- srcpkgs/NetworkManager/template | 2 +- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/srcpkgs/NetworkManager/patches/musl.patch b/srcpkgs/NetworkManager/patches/musl.patch index 486757c3825..71fb91936e6 100644 --- a/srcpkgs/NetworkManager/patches/musl.patch +++ b/srcpkgs/NetworkManager/patches/musl.patch @@ -1,30 +1,55 @@ -## moving the includes to below nm includes -## no longer works in 1.0.0. +For musl libc instead of including or +just define the required constant ETH_ALEN locally. + +--- libnm-core/nm-utils.h 2016-04-01 23:27:51.000000000 +0200 ++++ libnm-core/nm-utils.h 2016-11-01 02:37:51.933498880 +0100 +@@ -29,8 +29,14 @@ + + #include + +-/* For ETH_ALEN and INFINIBAND_ALEN */ ++#if defined(__GLIBC__) ++/* For ETH_ALEN */ + #include ++#else ++#define ETH_ALEN 6 /* Octets in one ethernet addr */ ++#endif ++ ++/* For INFINIBAND_ALEN */ + #include + + #include "nm-core-enum-types.h" --- src/platform/wifi/wifi-utils.h +++ src/platform/wifi/wifi-utils.h.new -@@ -22,10 +22,10 @@ +@@ -22,10 +22,14 @@ #ifndef __WIFI_UTILS_H__ #define __WIFI_UTILS_H__ --#include ++#if defined(__GLIBC__) + #include ++#else ++#define ETH_ALEN 6 /* Octets in one ethernet addr */ ++#endif #include #include "nm-dbus-interface.h" -+#include typedef struct WifiData WifiData; --- src/settings/nm-settings-connection.h +++ src/settings/nm-settings-connection.h.new -@@ -22,10 +22,9 @@ +@@ -22,10 +22,14 @@ #ifndef __NETWORKMANAGER_SETTINGS_CONNECTION_H__ #define __NETWORKMANAGER_SETTINGS_CONNECTION_H__ --#include -- ++#if defined(__GLIBC__) + #include ++#else ++#define ETH_ALEN 6 /* Octets in one ethernet addr */ ++#endif + #include #include "nm-types.h" -+#include G_BEGIN_DECLS diff --git a/srcpkgs/NetworkManager/template b/srcpkgs/NetworkManager/template index fc32ab6c68e..d09e7c6c0bb 100644 --- a/srcpkgs/NetworkManager/template +++ b/srcpkgs/NetworkManager/template @@ -1,7 +1,7 @@ # Template file for 'NetworkManager' pkgname=NetworkManager version=1.0.12 -revision=6 +revision=7 build_style=gnu-configure configure_args="--without-dhcpcd --with-dhclient=/usr/bin/dhclient --with-system-ca-path=/etc/ssl/certs --enable-more-warnings=no