From 70ecbc01874bf2f8603ccbdfda634cac0bb83d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= 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 --- 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 /* For ETH_ALEN and INFINIBAND_ALEN */ +#if defined(__GLIBC__) #include +#else +#define ETH_ALEN 6 /* Octets in one ethernet addr */ +#endif #include #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 #include +#if !defined(__GLIBC__) +/* SIOCGSTAMPNS from linux/asm-generic.h + * for src/systemd/src/libsystemd-network/sd-lldp.c */ +#include +#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 +#else /* musl libc */ +#define ETH_ALEN 6 /* Octets in one ethernet addr */ +#endif #include "nm-dbus-interface.h" #include "nm-setting-wireless.h"