summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-network-support.patch
blob: 45f607f2cbfcf7c908711bed93c8f40db6dbb0e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
From 70ecbc01874bf2f8603ccbdfda634cac0bb83d93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Thu, 22 Mar 2018 18:24:07 +0100
Subject: [PATCH] musl: network support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Upstream-Status: Pending

Stolen from [1] and prettyfied slightly

[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>

---
 libnm-core/nm-utils.h                  | 4 ++++
 shared/systemd/src/basic/socket-util.h | 6 ++++++
 src/platform/wifi/nm-wifi-utils.h      | 4 ++++
 3 files changed, 14 insertions(+)

diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
index 2b5baba..976850c 100644
--- a/libnm-core/nm-utils.h
+++ b/libnm-core/nm-utils.h
@@ -30,7 +30,11 @@
 #include <netinet/in.h>
 
 /* For ETH_ALEN and INFINIBAND_ALEN */
+#if defined(__GLIBC__)
 #include <linux/if_ether.h>
+#else
+#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
+#endif
 #include <linux/if_infiniband.h>
 
 #include "nm-core-enum-types.h"
diff --git a/shared/systemd/src/basic/socket-util.h b/shared/systemd/src/basic/socket-util.h
index d2246a8..76f257f 100644
--- a/shared/systemd/src/basic/socket-util.h
+++ b/shared/systemd/src/basic/socket-util.h
@@ -13,6 +13,12 @@
 #include <sys/types.h>
 #include <sys/un.h>
 
+#if !defined(__GLIBC__)
+/* SIOCGSTAMPNS from linux/asm-generic.h
+ * for src/systemd/src/libsystemd-network/sd-lldp.c */
+#include <linux/sockios.h>
+#endif
+
 #include "macro.h"
 #include "missing_socket.h"
 #include "sparse-endian.h"
diff --git a/src/platform/wifi/nm-wifi-utils.h b/src/platform/wifi/nm-wifi-utils.h
index 36148b5..d282eb2 100644
--- a/src/platform/wifi/nm-wifi-utils.h
+++ b/src/platform/wifi/nm-wifi-utils.h
@@ -22,7 +22,11 @@
 #ifndef __WIFI_UTILS_H__
 #define __WIFI_UTILS_H__
 
+#if defined(__GLIBC__)
 #include <net/ethernet.h>
+#else /* musl libc */
+#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
+#endif
 
 #include "nm-dbus-interface.h"
 #include "nm-setting-wireless.h"
OpenPOWER on IntegriCloud