Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | From 70ecbc01874bf2f8603ccbdfda634cac0bb83d93 Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> |
| 3 | Date: Thu, 22 Mar 2018 18:24:07 +0100 |
| 4 | Subject: [PATCH] musl: network support |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | |
| 11 | Stolen from [1] and prettyfied slightly |
| 12 | |
| 13 | [1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches |
| 14 | |
| 15 | Signed-off-by: Andreas MΓΌller <schnitzeltony@gmail.com> |
| 16 | |
| 17 | --- |
| 18 | libnm-core/nm-utils.h | 4 ++++ |
| 19 | shared/systemd/src/basic/socket-util.h | 6 ++++++ |
| 20 | src/platform/wifi/nm-wifi-utils.h | 4 ++++ |
| 21 | 3 files changed, 14 insertions(+) |
| 22 | |
| 23 | diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h |
| 24 | index 2b5baba..976850c 100644 |
| 25 | --- a/libnm-core/nm-utils.h |
| 26 | +++ b/libnm-core/nm-utils.h |
| 27 | @@ -30,7 +30,11 @@ |
| 28 | #include <netinet/in.h> |
| 29 | |
| 30 | /* For ETH_ALEN and INFINIBAND_ALEN */ |
| 31 | +#if defined(__GLIBC__) |
| 32 | #include <linux/if_ether.h> |
| 33 | +#else |
| 34 | +#define ETH_ALEN 6 /* Octets in one ethernet addr */ |
| 35 | +#endif |
| 36 | #include <linux/if_infiniband.h> |
| 37 | |
| 38 | #include "nm-core-enum-types.h" |
| 39 | diff --git a/shared/systemd/src/basic/socket-util.h b/shared/systemd/src/basic/socket-util.h |
| 40 | index d2246a8..76f257f 100644 |
| 41 | --- a/shared/systemd/src/basic/socket-util.h |
| 42 | +++ b/shared/systemd/src/basic/socket-util.h |
| 43 | @@ -13,6 +13,12 @@ |
| 44 | #include <sys/types.h> |
| 45 | #include <sys/un.h> |
| 46 | |
| 47 | +#if !defined(__GLIBC__) |
| 48 | +/* SIOCGSTAMPNS from linux/asm-generic.h |
| 49 | + * for src/systemd/src/libsystemd-network/sd-lldp.c */ |
| 50 | +#include <linux/sockios.h> |
| 51 | +#endif |
| 52 | + |
| 53 | #include "macro.h" |
| 54 | #include "missing_socket.h" |
| 55 | #include "sparse-endian.h" |
| 56 | diff --git a/src/platform/wifi/nm-wifi-utils.h b/src/platform/wifi/nm-wifi-utils.h |
| 57 | index 36148b5..d282eb2 100644 |
| 58 | --- a/src/platform/wifi/nm-wifi-utils.h |
| 59 | +++ b/src/platform/wifi/nm-wifi-utils.h |
| 60 | @@ -22,7 +22,11 @@ |
| 61 | #ifndef __WIFI_UTILS_H__ |
| 62 | #define __WIFI_UTILS_H__ |
| 63 | |
| 64 | +#if defined(__GLIBC__) |
| 65 | #include <net/ethernet.h> |
| 66 | +#else /* musl libc */ |
| 67 | +#define ETH_ALEN 6 /* Octets in one ethernet addr */ |
| 68 | +#endif |
| 69 | |
| 70 | #include "nm-dbus-interface.h" |
| 71 | #include "nm-setting-wireless.h" |