aboutsummaryrefslogtreecommitdiffstats
path: root/community/networkmanager/musl-network-support.patch
blob: 73c1930691517fd745b0df3814b182bb24dcf96b (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
--- 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"
--- a/src/platform/wifi/wifi-utils.h
+++ b/src/platform/wifi/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"
 
--- a/src/systemd/src/basic/socket-util.h
+++ b/src/systemd/src/basic/socket-util.h
@@ -28,6 +28,11 @@
 #include <sys/un.h>
 #include <linux/netlink.h>
 #include <linux/if_packet.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 "util.h"