NetworkManager: better fix for musl (aarch64)

This commit is contained in:
Juergen Buchmueller 2016-11-01 03:08:57 +01:00
parent a28624a877
commit b82eb00865
2 changed files with 35 additions and 10 deletions

View File

@ -1,30 +1,55 @@
## moving the <linux/xxxx> includes to below nm includes
## no longer works in 1.0.0.
For musl libc instead of including <linux/if_ether.h> or <net/ethernet.h>
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 <netinet/in.h>
-/* For ETH_ALEN and INFINIBAND_ALEN */
+#if defined(__GLIBC__)
+/* For ETH_ALEN */
#include <linux/if_ether.h>
+#else
+#define ETH_ALEN 6 /* Octets in one ethernet addr */
+#endif
+
+/* For INFINIBAND_ALEN */
#include <linux/if_infiniband.h>
#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 <net/ethernet.h>
+#if defined(__GLIBC__)
#include <net/ethernet.h>
+#else
+#define ETH_ALEN 6 /* Octets in one ethernet addr */
+#endif
#include <glib.h>
#include "nm-dbus-interface.h"
+#include <linux/if_ether.h>
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 <net/ethernet.h>
-
+#if defined(__GLIBC__)
#include <net/ethernet.h>
+#else
+#define ETH_ALEN 6 /* Octets in one ethernet addr */
+#endif
#include <nm-connection.h>
#include "nm-types.h"
+#include <linux/if_ether.h>
G_BEGIN_DECLS

View File

@ -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