diff options
10 files changed, 366 insertions, 439 deletions
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch deleted file mode 100644 index 555e5ffcbc..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | From b2cdab746ef64bc25ba0b9cff596ebdddd6e8dc6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 7 Nov 2018 11:30:44 -0800 | ||
| 4 | Subject: [PATCH] Do not include net/ethernet.h and linux/if_ether.h | ||
| 5 | |||
| 6 | They conflict when used together especially with musl | ||
| 7 | removing them still keeps it working so it seems they are redundant | ||
| 8 | |||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | |||
| 11 | --- | ||
| 12 | shared/n-acd/src/n-acd.c | 1 - | ||
| 13 | src/platform/wpan/nm-wpan-utils.h | 2 -- | ||
| 14 | src/settings/nm-settings-connection.h | 2 -- | ||
| 15 | 3 files changed, 5 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/shared/n-acd/src/n-acd.c b/shared/n-acd/src/n-acd.c | ||
| 18 | index def56a2..dd4eb78 100644 | ||
| 19 | --- a/shared/n-acd/src/n-acd.c | ||
| 20 | +++ b/shared/n-acd/src/n-acd.c | ||
| 21 | @@ -11,7 +11,6 @@ | ||
| 22 | #include <inttypes.h> | ||
| 23 | #include <limits.h> | ||
| 24 | #include <linux/if_packet.h> | ||
| 25 | -#include <netinet/if_ether.h> | ||
| 26 | #include <netinet/in.h> | ||
| 27 | #include <stdlib.h> | ||
| 28 | #include <string.h> | ||
| 29 | diff --git a/src/platform/wpan/nm-wpan-utils.h b/src/platform/wpan/nm-wpan-utils.h | ||
| 30 | index 1b54ec4..ed39938 100644 | ||
| 31 | --- a/src/platform/wpan/nm-wpan-utils.h | ||
| 32 | +++ b/src/platform/wpan/nm-wpan-utils.h | ||
| 33 | @@ -20,8 +20,6 @@ | ||
| 34 | #ifndef __WPAN_UTILS_H__ | ||
| 35 | #define __WPAN_UTILS_H__ | ||
| 36 | |||
| 37 | -#include <net/ethernet.h> | ||
| 38 | - | ||
| 39 | #include "nm-dbus-interface.h" | ||
| 40 | #include "platform/nm-netlink.h" | ||
| 41 | |||
| 42 | diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h | ||
| 43 | index e796b71..c01fef6 100644 | ||
| 44 | --- a/src/settings/nm-settings-connection.h | ||
| 45 | +++ b/src/settings/nm-settings-connection.h | ||
| 46 | @@ -22,8 +22,6 @@ | ||
| 47 | #ifndef __NETWORKMANAGER_SETTINGS_CONNECTION_H__ | ||
| 48 | #define __NETWORKMANAGER_SETTINGS_CONNECTION_H__ | ||
| 49 | |||
| 50 | -#include <net/ethernet.h> | ||
| 51 | - | ||
| 52 | #include "nm-dbus-object.h" | ||
| 53 | #include "nm-connection.h" | ||
| 54 | |||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl.patch new file mode 100644 index 0000000000..21e9a16d6d --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl.patch | |||
| @@ -0,0 +1,364 @@ | |||
| 1 | From f43c9a5b07832a91383e59d655bc3c8a9f48c451 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> | ||
| 3 | Date: Tue, 2 Apr 2019 01:34:35 +0200 | ||
| 4 | Subject: [PATCH] Fix build with musl | ||
| 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 | Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | ||
| 12 | --- | ||
| 13 | clients/cli/connections.c | 1 - | ||
| 14 | configure.ac | 1 + | ||
| 15 | libnm-core/nm-utils.c | 2 +- | ||
| 16 | shared/n-acd/src/n-acd.c | 1 - | ||
| 17 | shared/systemd/src/basic/in-addr-util.c | 1 + | ||
| 18 | shared/systemd/src/basic/process-util.c | 9 ++++++ | ||
| 19 | shared/systemd/src/basic/socket-util.h | 6 ++++ | ||
| 20 | shared/systemd/src/basic/stdio-util.h | 2 ++ | ||
| 21 | shared/systemd/src/basic/string-util.h | 5 ++++ | ||
| 22 | shared/systemd/src/basic/util.h | 29 ++++---------------- | ||
| 23 | src/platform/wifi/nm-wifi-utils.h | 4 +++ | ||
| 24 | src/platform/wpan/nm-wpan-utils.h | 2 -- | ||
| 25 | src/settings/nm-settings-connection.h | 2 -- | ||
| 26 | src/systemd/src/libsystemd-network/sd-lldp.c | 1 + | ||
| 27 | src/systemd/src/systemd/sd-dhcp-client.h | 2 ++ | ||
| 28 | src/systemd/src/systemd/sd-dhcp-lease.h | 2 ++ | ||
| 29 | src/systemd/src/systemd/sd-dhcp6-client.h | 2 ++ | ||
| 30 | src/systemd/src/systemd/sd-ipv4ll.h | 2 ++ | ||
| 31 | src/systemd/src/systemd/sd-lldp.h | 2 +- | ||
| 32 | 19 files changed, 44 insertions(+), 32 deletions(-) | ||
| 33 | |||
| 34 | diff --git a/clients/cli/connections.c b/clients/cli/connections.c | ||
| 35 | index 6db44f8..36e51cc 100644 | ||
| 36 | --- a/clients/cli/connections.c | ||
| 37 | +++ b/clients/cli/connections.c | ||
| 38 | @@ -25,7 +25,6 @@ | ||
| 39 | #include <stdlib.h> | ||
| 40 | #include <unistd.h> | ||
| 41 | #include <signal.h> | ||
| 42 | -#include <netinet/ether.h> | ||
| 43 | #include <readline/readline.h> | ||
| 44 | #include <readline/history.h> | ||
| 45 | #include <fcntl.h> | ||
| 46 | diff --git a/configure.ac b/configure.ac | ||
| 47 | index 872c292..b1d7a68 100644 | ||
| 48 | --- a/configure.ac | ||
| 49 | +++ b/configure.ac | ||
| 50 | @@ -241,6 +241,7 @@ dnl | ||
| 51 | dnl Checks for libdl - on certain platforms its part of libc | ||
| 52 | dnl | ||
| 53 | AC_SEARCH_LIBS([dlopen], [dl dld], [], [ac_cv_search_dlopen=]) | ||
| 54 | +AS_IF([test "$ac_cv_search_dlopen" = "none required"],[ac_cv_search_dlopen=""]) | ||
| 55 | AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen") | ||
| 56 | |||
| 57 | PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0], | ||
| 58 | diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c | ||
| 59 | index d276cfe..2aec785 100644 | ||
| 60 | --- a/libnm-core/nm-utils.c | ||
| 61 | +++ b/libnm-core/nm-utils.c | ||
| 62 | @@ -21,10 +21,10 @@ | ||
| 63 | |||
| 64 | #include "nm-default.h" | ||
| 65 | |||
| 66 | +#include <netinet/ether.h> | ||
| 67 | #include "nm-utils.h" | ||
| 68 | |||
| 69 | #include <stdlib.h> | ||
| 70 | -#include <netinet/ether.h> | ||
| 71 | #include <arpa/inet.h> | ||
| 72 | #include <uuid/uuid.h> | ||
| 73 | #include <libintl.h> | ||
| 74 | diff --git a/shared/n-acd/src/n-acd.c b/shared/n-acd/src/n-acd.c | ||
| 75 | index def56a2..dd4eb78 100644 | ||
| 76 | --- a/shared/n-acd/src/n-acd.c | ||
| 77 | +++ b/shared/n-acd/src/n-acd.c | ||
| 78 | @@ -11,7 +11,6 @@ | ||
| 79 | #include <inttypes.h> | ||
| 80 | #include <limits.h> | ||
| 81 | #include <linux/if_packet.h> | ||
| 82 | -#include <netinet/if_ether.h> | ||
| 83 | #include <netinet/in.h> | ||
| 84 | #include <stdlib.h> | ||
| 85 | #include <string.h> | ||
| 86 | diff --git a/shared/systemd/src/basic/in-addr-util.c b/shared/systemd/src/basic/in-addr-util.c | ||
| 87 | index 5ced350..c6b52b8 100644 | ||
| 88 | --- a/shared/systemd/src/basic/in-addr-util.c | ||
| 89 | +++ b/shared/systemd/src/basic/in-addr-util.c | ||
| 90 | @@ -13,6 +13,7 @@ | ||
| 91 | #include "in-addr-util.h" | ||
| 92 | #include "macro.h" | ||
| 93 | #include "parse-util.h" | ||
| 94 | +#include "string-util.h" | ||
| 95 | #include "util.h" | ||
| 96 | |||
| 97 | bool in4_addr_is_null(const struct in_addr *a) { | ||
| 98 | diff --git a/shared/systemd/src/basic/process-util.c b/shared/systemd/src/basic/process-util.c | ||
| 99 | index b0afb5c..7adc8bd 100644 | ||
| 100 | --- a/shared/systemd/src/basic/process-util.c | ||
| 101 | +++ b/shared/systemd/src/basic/process-util.c | ||
| 102 | @@ -21,6 +21,9 @@ | ||
| 103 | #include <sys/wait.h> | ||
| 104 | #include <syslog.h> | ||
| 105 | #include <unistd.h> | ||
| 106 | +#ifndef __GLIBC__ | ||
| 107 | +#include <pthread.h> | ||
| 108 | +#endif | ||
| 109 | #if 0 /* NM_IGNORED */ | ||
| 110 | #if HAVE_VALGRIND_VALGRIND_H | ||
| 111 | #include <valgrind/valgrind.h> | ||
| 112 | @@ -1168,11 +1171,13 @@ void reset_cached_pid(void) { | ||
| 113 | cached_pid = CACHED_PID_UNSET; | ||
| 114 | } | ||
| 115 | |||
| 116 | +#ifdef __GLIBC__ | ||
| 117 | /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc | ||
| 118 | * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against | ||
| 119 | * libpthread, as it is part of glibc anyway. */ | ||
| 120 | extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle); | ||
| 121 | extern void* __dso_handle _weak_; | ||
| 122 | +#endif | ||
| 123 | |||
| 124 | pid_t getpid_cached(void) { | ||
| 125 | static bool installed = false; | ||
| 126 | @@ -1201,7 +1206,11 @@ pid_t getpid_cached(void) { | ||
| 127 | * only half-documented (glibc doesn't document it but LSB does — though only superficially) | ||
| 128 | * we'll check for errors only in the most generic fashion possible. */ | ||
| 129 | |||
| 130 | +#ifdef __GLIBC__ | ||
| 131 | if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) { | ||
| 132 | +#else | ||
| 133 | + if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) { | ||
| 134 | +#endif | ||
| 135 | /* OOM? Let's try again later */ | ||
| 136 | cached_pid = CACHED_PID_UNSET; | ||
| 137 | return new_pid; | ||
| 138 | diff --git a/shared/systemd/src/basic/socket-util.h b/shared/systemd/src/basic/socket-util.h | ||
| 139 | index d2246a8..76f257f 100644 | ||
| 140 | --- a/shared/systemd/src/basic/socket-util.h | ||
| 141 | +++ b/shared/systemd/src/basic/socket-util.h | ||
| 142 | @@ -13,6 +13,12 @@ | ||
| 143 | #include <sys/types.h> | ||
| 144 | #include <sys/un.h> | ||
| 145 | |||
| 146 | +#if !defined(__GLIBC__) | ||
| 147 | +/* SIOCGSTAMPNS from linux/asm-generic.h | ||
| 148 | + * for src/systemd/src/libsystemd-network/sd-lldp.c */ | ||
| 149 | +#include <linux/sockios.h> | ||
| 150 | +#endif | ||
| 151 | + | ||
| 152 | #include "macro.h" | ||
| 153 | #include "missing_socket.h" | ||
| 154 | #include "sparse-endian.h" | ||
| 155 | diff --git a/shared/systemd/src/basic/stdio-util.h b/shared/systemd/src/basic/stdio-util.h | ||
| 156 | index dc67b6e..6336243 100644 | ||
| 157 | --- a/shared/systemd/src/basic/stdio-util.h | ||
| 158 | +++ b/shared/systemd/src/basic/stdio-util.h | ||
| 159 | @@ -1,7 +1,9 @@ | ||
| 160 | /* SPDX-License-Identifier: LGPL-2.1+ */ | ||
| 161 | #pragma once | ||
| 162 | |||
| 163 | +#if defined(__GLIBC__) | ||
| 164 | #include <printf.h> | ||
| 165 | +#endif | ||
| 166 | #include <stdarg.h> | ||
| 167 | #include <stdio.h> | ||
| 168 | #include <sys/types.h> | ||
| 169 | diff --git a/shared/systemd/src/basic/string-util.h b/shared/systemd/src/basic/string-util.h | ||
| 170 | index 38070ab..6b918e0 100644 | ||
| 171 | --- a/shared/systemd/src/basic/string-util.h | ||
| 172 | +++ b/shared/systemd/src/basic/string-util.h | ||
| 173 | @@ -27,6 +27,11 @@ | ||
| 174 | #define strcaseeq(a,b) (strcasecmp((a),(b)) == 0) | ||
| 175 | #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0) | ||
| 176 | |||
| 177 | +/* musl does not know strndupa */ | ||
| 178 | +#if !defined(__GLIBC__) | ||
| 179 | +#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s) | ||
| 180 | +#endif | ||
| 181 | + | ||
| 182 | int strcmp_ptr(const char *a, const char *b) _pure_; | ||
| 183 | |||
| 184 | static inline bool streq_ptr(const char *a, const char *b) { | ||
| 185 | diff --git a/shared/systemd/src/basic/util.h b/shared/systemd/src/basic/util.h | ||
| 186 | index dc33d66..cc768e9 100644 | ||
| 187 | --- a/shared/systemd/src/basic/util.h | ||
| 188 | +++ b/shared/systemd/src/basic/util.h | ||
| 189 | @@ -27,6 +27,11 @@ | ||
| 190 | #include "macro.h" | ||
| 191 | #include "time-util.h" | ||
| 192 | |||
| 193 | +#if !defined(__GLIBC__) | ||
| 194 | +typedef int (*__compar_fn_t) (const void*, const void*); | ||
| 195 | +typedef __compar_fn_t comparison_fn_t; | ||
| 196 | +#endif | ||
| 197 | + | ||
| 198 | size_t page_size(void) _pure_; | ||
| 199 | #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) | ||
| 200 | |||
| 201 | @@ -66,16 +71,6 @@ int prot_from_flags(int flags) _const_; | ||
| 202 | bool in_initrd(void); | ||
| 203 | void in_initrd_force(bool value); | ||
| 204 | |||
| 205 | -void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size, | ||
| 206 | - __compar_d_fn_t compar, void *arg); | ||
| 207 | - | ||
| 208 | -#define typesafe_bsearch_r(k, b, n, func, userdata) \ | ||
| 209 | - ({ \ | ||
| 210 | - const typeof(b[0]) *_k = k; \ | ||
| 211 | - int (*_func_)(const typeof(b[0])*, const typeof(b[0])*, typeof(userdata)) = func; \ | ||
| 212 | - xbsearch_r((const void*) _k, (b), (n), sizeof((b)[0]), (__compar_d_fn_t) _func_, userdata); \ | ||
| 213 | - }) | ||
| 214 | - | ||
| 215 | /** | ||
| 216 | * Normal bsearch requires base to be nonnull. Here were require | ||
| 217 | * that only if nmemb > 0. | ||
| 218 | @@ -116,20 +111,6 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn | ||
| 219 | qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \ | ||
| 220 | }) | ||
| 221 | |||
| 222 | -static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) { | ||
| 223 | - if (nmemb <= 1) | ||
| 224 | - return; | ||
| 225 | - | ||
| 226 | - assert(base); | ||
| 227 | - qsort_r(base, nmemb, size, compar, userdata); | ||
| 228 | -} | ||
| 229 | - | ||
| 230 | -#define typesafe_qsort_r(p, n, func, userdata) \ | ||
| 231 | - ({ \ | ||
| 232 | - int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ | ||
| 233 | - qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \ | ||
| 234 | - }) | ||
| 235 | - | ||
| 236 | /* Normal memcpy requires src to be nonnull. We do nothing if n is 0. */ | ||
| 237 | static inline void memcpy_safe(void *dst, const void *src, size_t n) { | ||
| 238 | if (n == 0) | ||
| 239 | diff --git a/src/platform/wifi/nm-wifi-utils.h b/src/platform/wifi/nm-wifi-utils.h | ||
| 240 | index 36148b5..d282eb2 100644 | ||
| 241 | --- a/src/platform/wifi/nm-wifi-utils.h | ||
| 242 | +++ b/src/platform/wifi/nm-wifi-utils.h | ||
| 243 | @@ -22,7 +22,11 @@ | ||
| 244 | #ifndef __WIFI_UTILS_H__ | ||
| 245 | #define __WIFI_UTILS_H__ | ||
| 246 | |||
| 247 | +#if defined(__GLIBC__) | ||
| 248 | #include <net/ethernet.h> | ||
| 249 | +#else /* musl libc */ | ||
| 250 | +#define ETH_ALEN 6 /* Octets in one ethernet addr */ | ||
| 251 | +#endif | ||
| 252 | |||
| 253 | #include "nm-dbus-interface.h" | ||
| 254 | #include "nm-setting-wireless.h" | ||
| 255 | diff --git a/src/platform/wpan/nm-wpan-utils.h b/src/platform/wpan/nm-wpan-utils.h | ||
| 256 | index 1b54ec4..ed39938 100644 | ||
| 257 | --- a/src/platform/wpan/nm-wpan-utils.h | ||
| 258 | +++ b/src/platform/wpan/nm-wpan-utils.h | ||
| 259 | @@ -20,8 +20,6 @@ | ||
| 260 | #ifndef __WPAN_UTILS_H__ | ||
| 261 | #define __WPAN_UTILS_H__ | ||
| 262 | |||
| 263 | -#include <net/ethernet.h> | ||
| 264 | - | ||
| 265 | #include "nm-dbus-interface.h" | ||
| 266 | #include "platform/nm-netlink.h" | ||
| 267 | |||
| 268 | diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h | ||
| 269 | index e796b71..c01fef6 100644 | ||
| 270 | --- a/src/settings/nm-settings-connection.h | ||
| 271 | +++ b/src/settings/nm-settings-connection.h | ||
| 272 | @@ -22,8 +22,6 @@ | ||
| 273 | #ifndef __NETWORKMANAGER_SETTINGS_CONNECTION_H__ | ||
| 274 | #define __NETWORKMANAGER_SETTINGS_CONNECTION_H__ | ||
| 275 | |||
| 276 | -#include <net/ethernet.h> | ||
| 277 | - | ||
| 278 | #include "nm-dbus-object.h" | ||
| 279 | #include "nm-connection.h" | ||
| 280 | |||
| 281 | diff --git a/src/systemd/src/libsystemd-network/sd-lldp.c b/src/systemd/src/libsystemd-network/sd-lldp.c | ||
| 282 | index 741128e..62914ae 100644 | ||
| 283 | --- a/src/systemd/src/libsystemd-network/sd-lldp.c | ||
| 284 | +++ b/src/systemd/src/libsystemd-network/sd-lldp.c | ||
| 285 | @@ -3,6 +3,7 @@ | ||
| 286 | #include "nm-sd-adapt-core.h" | ||
| 287 | |||
| 288 | #include <arpa/inet.h> | ||
| 289 | +#include <net/ethernet.h> | ||
| 290 | #include <linux/sockios.h> | ||
| 291 | #include <sys/ioctl.h> | ||
| 292 | |||
| 293 | diff --git a/src/systemd/src/systemd/sd-dhcp-client.h b/src/systemd/src/systemd/sd-dhcp-client.h | ||
| 294 | index bd0d429..c935fe1 100644 | ||
| 295 | --- a/src/systemd/src/systemd/sd-dhcp-client.h | ||
| 296 | +++ b/src/systemd/src/systemd/sd-dhcp-client.h | ||
| 297 | @@ -20,7 +20,9 @@ | ||
| 298 | ***/ | ||
| 299 | |||
| 300 | #include <inttypes.h> | ||
| 301 | +#if defined(__GLIBC__) | ||
| 302 | #include <net/ethernet.h> | ||
| 303 | +#endif | ||
| 304 | #include <netinet/in.h> | ||
| 305 | #include <sys/types.h> | ||
| 306 | #include <stdbool.h> | ||
| 307 | diff --git a/src/systemd/src/systemd/sd-dhcp-lease.h b/src/systemd/src/systemd/sd-dhcp-lease.h | ||
| 308 | index d299c79..991e67e 100644 | ||
| 309 | --- a/src/systemd/src/systemd/sd-dhcp-lease.h | ||
| 310 | +++ b/src/systemd/src/systemd/sd-dhcp-lease.h | ||
| 311 | @@ -19,7 +19,9 @@ | ||
| 312 | ***/ | ||
| 313 | |||
| 314 | #include <inttypes.h> | ||
| 315 | +#if defined(__GLIBC__) | ||
| 316 | #include <net/ethernet.h> | ||
| 317 | +#endif | ||
| 318 | #include <netinet/in.h> | ||
| 319 | #include <sys/types.h> | ||
| 320 | |||
| 321 | diff --git a/src/systemd/src/systemd/sd-dhcp6-client.h b/src/systemd/src/systemd/sd-dhcp6-client.h | ||
| 322 | index 43d38f5..57ab487 100644 | ||
| 323 | --- a/src/systemd/src/systemd/sd-dhcp6-client.h | ||
| 324 | +++ b/src/systemd/src/systemd/sd-dhcp6-client.h | ||
| 325 | @@ -20,7 +20,9 @@ | ||
| 326 | ***/ | ||
| 327 | |||
| 328 | #include <inttypes.h> | ||
| 329 | +#if defined(__GLIBC__) | ||
| 330 | #include <net/ethernet.h> | ||
| 331 | +#endif | ||
| 332 | #include <sys/types.h> | ||
| 333 | |||
| 334 | #include "sd-dhcp6-lease.h" | ||
| 335 | diff --git a/src/systemd/src/systemd/sd-ipv4ll.h b/src/systemd/src/systemd/sd-ipv4ll.h | ||
| 336 | index 71bd4cf..1c667ba 100644 | ||
| 337 | --- a/src/systemd/src/systemd/sd-ipv4ll.h | ||
| 338 | +++ b/src/systemd/src/systemd/sd-ipv4ll.h | ||
| 339 | @@ -19,7 +19,9 @@ | ||
| 340 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | ||
| 341 | ***/ | ||
| 342 | |||
| 343 | +#if defined(__GLIBC__) | ||
| 344 | #include <net/ethernet.h> | ||
| 345 | +#endif | ||
| 346 | #include <netinet/in.h> | ||
| 347 | |||
| 348 | #include "sd-event.h" | ||
| 349 | diff --git a/src/systemd/src/systemd/sd-lldp.h b/src/systemd/src/systemd/sd-lldp.h | ||
| 350 | index bf3afad..4cace87 100644 | ||
| 351 | --- a/src/systemd/src/systemd/sd-lldp.h | ||
| 352 | +++ b/src/systemd/src/systemd/sd-lldp.h | ||
| 353 | @@ -18,7 +18,7 @@ | ||
| 354 | ***/ | ||
| 355 | |||
| 356 | #include <inttypes.h> | ||
| 357 | -#include <net/ethernet.h> | ||
| 358 | +//#include <net/ethernet.h> | ||
| 359 | #include <sys/types.h> | ||
| 360 | |||
| 361 | #include "sd-event.h" | ||
| 362 | -- | ||
| 363 | 2.20.1 | ||
| 364 | |||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch deleted file mode 100644 index 5c59208b48..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | From 32dc6cab58912add5bc6495558538953d9344c36 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 31 Mar 2017 16:48:00 -0700 | ||
| 4 | Subject: [PATCH] sd-lldp.h: Remove net/ethernet.h seems to be over specified | ||
| 5 | |||
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 7 | |||
| 8 | --- | ||
| 9 | src/systemd/src/libsystemd-network/sd-lldp.c | 1 + | ||
| 10 | src/systemd/src/systemd/sd-lldp.h | 2 +- | ||
| 11 | 2 files changed, 2 insertions(+), 1 deletion(-) | ||
| 12 | |||
| 13 | diff --git a/src/systemd/src/libsystemd-network/sd-lldp.c b/src/systemd/src/libsystemd-network/sd-lldp.c | ||
| 14 | index 741128e..62914ae 100644 | ||
| 15 | --- a/src/systemd/src/libsystemd-network/sd-lldp.c | ||
| 16 | +++ b/src/systemd/src/libsystemd-network/sd-lldp.c | ||
| 17 | @@ -3,6 +3,7 @@ | ||
| 18 | #include "nm-sd-adapt-core.h" | ||
| 19 | |||
| 20 | #include <arpa/inet.h> | ||
| 21 | +#include <net/ethernet.h> | ||
| 22 | #include <linux/sockios.h> | ||
| 23 | #include <sys/ioctl.h> | ||
| 24 | |||
| 25 | diff --git a/src/systemd/src/systemd/sd-lldp.h b/src/systemd/src/systemd/sd-lldp.h | ||
| 26 | index bf3afad..4cace87 100644 | ||
| 27 | --- a/src/systemd/src/systemd/sd-lldp.h | ||
| 28 | +++ b/src/systemd/src/systemd/sd-lldp.h | ||
| 29 | @@ -18,7 +18,7 @@ | ||
| 30 | ***/ | ||
| 31 | |||
| 32 | #include <inttypes.h> | ||
| 33 | -#include <net/ethernet.h> | ||
| 34 | +//#include <net/ethernet.h> | ||
| 35 | #include <sys/types.h> | ||
| 36 | |||
| 37 | #include "sd-event.h" | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-basic.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-basic.patch deleted file mode 100644 index 8d905489ff..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-basic.patch +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | From ff1a5b849755db67b1778940fff92d6eb8b8b050 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 17:54:10 +0100 | ||
| 4 | Subject: [PATCH] Usual fix for musl libc | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> | ||
| 10 | MIME-Version: 1.0 | ||
| 11 | Content-Type: text/plain; charset=UTF-8 | ||
| 12 | Content-Transfer-Encoding: 8bit | ||
| 13 | |||
| 14 | Upstream-Status: Pending | ||
| 15 | |||
| 16 | Stolen from [1] and prettyfied slightly | ||
| 17 | |||
| 18 | [1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches | ||
| 19 | |||
| 20 | Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | ||
| 21 | |||
| 22 | --- | ||
| 23 | shared/systemd/src/basic/stdio-util.h | 2 ++ | ||
| 24 | shared/systemd/src/basic/util.h | 5 +++++ | ||
| 25 | 2 files changed, 7 insertions(+) | ||
| 26 | |||
| 27 | diff --git a/shared/systemd/src/basic/stdio-util.h b/shared/systemd/src/basic/stdio-util.h | ||
| 28 | index dc67b6e..6336243 100644 | ||
| 29 | --- a/shared/systemd/src/basic/stdio-util.h | ||
| 30 | +++ b/shared/systemd/src/basic/stdio-util.h | ||
| 31 | @@ -1,7 +1,9 @@ | ||
| 32 | /* SPDX-License-Identifier: LGPL-2.1+ */ | ||
| 33 | #pragma once | ||
| 34 | |||
| 35 | +#if defined(__GLIBC__) | ||
| 36 | #include <printf.h> | ||
| 37 | +#endif | ||
| 38 | #include <stdarg.h> | ||
| 39 | #include <stdio.h> | ||
| 40 | #include <sys/types.h> | ||
| 41 | diff --git a/shared/systemd/src/basic/util.h b/shared/systemd/src/basic/util.h | ||
| 42 | index dc33d66..8ee2d64 100644 | ||
| 43 | --- a/shared/systemd/src/basic/util.h | ||
| 44 | +++ b/shared/systemd/src/basic/util.h | ||
| 45 | @@ -27,6 +27,11 @@ | ||
| 46 | #include "macro.h" | ||
| 47 | #include "time-util.h" | ||
| 48 | |||
| 49 | +#if !defined(__GLIBC__) | ||
| 50 | +typedef int (*__compar_fn_t) (const void*, const void*); | ||
| 51 | +typedef __compar_fn_t comparison_fn_t; | ||
| 52 | +#endif | ||
| 53 | + | ||
| 54 | size_t page_size(void) _pure_; | ||
| 55 | #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) | ||
| 56 | |||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-dlopen-configure-ac.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-dlopen-configure-ac.patch deleted file mode 100644 index 419e1be246..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-dlopen-configure-ac.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | From 7743ea63fbe572b1f82db7d399fe9c5c99521432 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:18:06 +0100 | ||
| 4 | Subject: [PATCH] musl: dlopen is included so LD_LIBS="" instead of | ||
| 5 | LD_LIBS="none required" | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-Transfer-Encoding: 8bit | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Stolen from [1] and prettyfied slightly | ||
| 13 | |||
| 14 | [1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches | ||
| 15 | |||
| 16 | Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | ||
| 17 | |||
| 18 | --- | ||
| 19 | configure.ac | 1 + | ||
| 20 | 1 file changed, 1 insertion(+) | ||
| 21 | |||
| 22 | diff --git a/configure.ac b/configure.ac | ||
| 23 | index b914219..1b2b0ff 100644 | ||
| 24 | --- a/configure.ac | ||
| 25 | +++ b/configure.ac | ||
| 26 | @@ -241,6 +241,7 @@ dnl | ||
| 27 | dnl Checks for libdl - on certain platforms its part of libc | ||
| 28 | dnl | ||
| 29 | AC_SEARCH_LIBS([dlopen], [dl dld], [], [ac_cv_search_dlopen=]) | ||
| 30 | +AS_IF([test "$ac_cv_search_dlopen" = "none required"],[ac_cv_search_dlopen=""]) | ||
| 31 | AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen") | ||
| 32 | |||
| 33 | PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0], | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-network-support.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-network-support.patch deleted file mode 100644 index 45f607f2cb..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-network-support.patch +++ /dev/null | |||
| @@ -1,71 +0,0 @@ | |||
| 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" | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-musl-process-util.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-musl-process-util.patch deleted file mode 100644 index 525e35932c..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-musl-process-util.patch +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | From 4f2fb1e1f785bad22df8f3d96cb4792acf21f315 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> | ||
| 3 | Date: Thu, 25 Oct 2018 09:57:07 +0200 | ||
| 4 | Subject: [PATCH] musl: process-util | ||
| 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 | shared/systemd/src/basic/process-util.c | 9 +++++++++ | ||
| 19 | 1 file changed, 9 insertions(+) | ||
| 20 | |||
| 21 | diff --git a/shared/systemd/src/basic/process-util.c b/shared/systemd/src/basic/process-util.c | ||
| 22 | index b0afb5c..7adc8bd 100644 | ||
| 23 | --- a/shared/systemd/src/basic/process-util.c | ||
| 24 | +++ b/shared/systemd/src/basic/process-util.c | ||
| 25 | @@ -21,6 +21,9 @@ | ||
| 26 | #include <sys/wait.h> | ||
| 27 | #include <syslog.h> | ||
| 28 | #include <unistd.h> | ||
| 29 | +#ifndef __GLIBC__ | ||
| 30 | +#include <pthread.h> | ||
| 31 | +#endif | ||
| 32 | #if 0 /* NM_IGNORED */ | ||
| 33 | #if HAVE_VALGRIND_VALGRIND_H | ||
| 34 | #include <valgrind/valgrind.h> | ||
| 35 | @@ -1168,11 +1171,13 @@ void reset_cached_pid(void) { | ||
| 36 | cached_pid = CACHED_PID_UNSET; | ||
| 37 | } | ||
| 38 | |||
| 39 | +#ifdef __GLIBC__ | ||
| 40 | /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc | ||
| 41 | * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against | ||
| 42 | * libpthread, as it is part of glibc anyway. */ | ||
| 43 | extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle); | ||
| 44 | extern void* __dso_handle _weak_; | ||
| 45 | +#endif | ||
| 46 | |||
| 47 | pid_t getpid_cached(void) { | ||
| 48 | static bool installed = false; | ||
| 49 | @@ -1201,7 +1206,11 @@ pid_t getpid_cached(void) { | ||
| 50 | * only half-documented (glibc doesn't document it but LSB does — though only superficially) | ||
| 51 | * we'll check for errors only in the most generic fashion possible. */ | ||
| 52 | |||
| 53 | +#ifdef __GLIBC__ | ||
| 54 | if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) { | ||
| 55 | +#else | ||
| 56 | + if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) { | ||
| 57 | +#endif | ||
| 58 | /* OOM? Let's try again later */ | ||
| 59 | cached_pid = CACHED_PID_UNSET; | ||
| 60 | return new_pid; | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0007-musl-avoid-further-conflicts-by-including-net-ethern.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0007-musl-avoid-further-conflicts-by-including-net-ethern.patch deleted file mode 100644 index 211a2da941..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0007-musl-avoid-further-conflicts-by-including-net-ethern.patch +++ /dev/null | |||
| @@ -1,75 +0,0 @@ | |||
| 1 | From 4232a34064e33b52f07cca51b902b93699800f72 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> | ||
| 3 | Date: Mon, 16 Apr 2018 14:45:44 +0200 | ||
| 4 | Subject: [PATCH] musl: avoid further conflicts by including net/ethernet.h | ||
| 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 | Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | ||
| 12 | |||
| 13 | --- | ||
| 14 | src/systemd/src/systemd/sd-dhcp-client.h | 2 ++ | ||
| 15 | src/systemd/src/systemd/sd-dhcp-lease.h | 2 ++ | ||
| 16 | src/systemd/src/systemd/sd-dhcp6-client.h | 2 ++ | ||
| 17 | src/systemd/src/systemd/sd-ipv4ll.h | 2 ++ | ||
| 18 | 4 files changed, 8 insertions(+) | ||
| 19 | |||
| 20 | diff --git a/src/systemd/src/systemd/sd-dhcp-client.h b/src/systemd/src/systemd/sd-dhcp-client.h | ||
| 21 | index bd0d429..c935fe1 100644 | ||
| 22 | --- a/src/systemd/src/systemd/sd-dhcp-client.h | ||
| 23 | +++ b/src/systemd/src/systemd/sd-dhcp-client.h | ||
| 24 | @@ -20,7 +20,9 @@ | ||
| 25 | ***/ | ||
| 26 | |||
| 27 | #include <inttypes.h> | ||
| 28 | +#if defined(__GLIBC__) | ||
| 29 | #include <net/ethernet.h> | ||
| 30 | +#endif | ||
| 31 | #include <netinet/in.h> | ||
| 32 | #include <sys/types.h> | ||
| 33 | #include <stdbool.h> | ||
| 34 | diff --git a/src/systemd/src/systemd/sd-dhcp-lease.h b/src/systemd/src/systemd/sd-dhcp-lease.h | ||
| 35 | index d299c79..991e67e 100644 | ||
| 36 | --- a/src/systemd/src/systemd/sd-dhcp-lease.h | ||
| 37 | +++ b/src/systemd/src/systemd/sd-dhcp-lease.h | ||
| 38 | @@ -19,7 +19,9 @@ | ||
| 39 | ***/ | ||
| 40 | |||
| 41 | #include <inttypes.h> | ||
| 42 | +#if defined(__GLIBC__) | ||
| 43 | #include <net/ethernet.h> | ||
| 44 | +#endif | ||
| 45 | #include <netinet/in.h> | ||
| 46 | #include <sys/types.h> | ||
| 47 | |||
| 48 | diff --git a/src/systemd/src/systemd/sd-dhcp6-client.h b/src/systemd/src/systemd/sd-dhcp6-client.h | ||
| 49 | index 43d38f5..57ab487 100644 | ||
| 50 | --- a/src/systemd/src/systemd/sd-dhcp6-client.h | ||
| 51 | +++ b/src/systemd/src/systemd/sd-dhcp6-client.h | ||
| 52 | @@ -20,7 +20,9 @@ | ||
| 53 | ***/ | ||
| 54 | |||
| 55 | #include <inttypes.h> | ||
| 56 | +#if defined(__GLIBC__) | ||
| 57 | #include <net/ethernet.h> | ||
| 58 | +#endif | ||
| 59 | #include <sys/types.h> | ||
| 60 | |||
| 61 | #include "sd-dhcp6-lease.h" | ||
| 62 | diff --git a/src/systemd/src/systemd/sd-ipv4ll.h b/src/systemd/src/systemd/sd-ipv4ll.h | ||
| 63 | index 71bd4cf..1c667ba 100644 | ||
| 64 | --- a/src/systemd/src/systemd/sd-ipv4ll.h | ||
| 65 | +++ b/src/systemd/src/systemd/sd-ipv4ll.h | ||
| 66 | @@ -19,7 +19,9 @@ | ||
| 67 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | ||
| 68 | ***/ | ||
| 69 | |||
| 70 | +#if defined(__GLIBC__) | ||
| 71 | #include <net/ethernet.h> | ||
| 72 | +#endif | ||
| 73 | #include <netinet/in.h> | ||
| 74 | |||
| 75 | #include "sd-event.h" | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0008-Add-a-strndupa-replacement-for-musl.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0008-Add-a-strndupa-replacement-for-musl.patch deleted file mode 100644 index 8858101852..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0008-Add-a-strndupa-replacement-for-musl.patch +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | From cdd69321ec97ed19e66a747a968a1637a251b9e6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> | ||
| 3 | Date: Mon, 16 Apr 2018 15:07:20 +0200 | ||
| 4 | Subject: [PATCH] Add a strndupa replacement for musl | ||
| 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 | Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | ||
| 12 | |||
| 13 | --- | ||
| 14 | shared/systemd/src/basic/in-addr-util.c | 1 + | ||
| 15 | shared/systemd/src/basic/string-util.h | 5 +++++ | ||
| 16 | 2 files changed, 6 insertions(+) | ||
| 17 | |||
| 18 | diff --git a/shared/systemd/src/basic/in-addr-util.c b/shared/systemd/src/basic/in-addr-util.c | ||
| 19 | index 5ced350..c6b52b8 100644 | ||
| 20 | --- a/shared/systemd/src/basic/in-addr-util.c | ||
| 21 | +++ b/shared/systemd/src/basic/in-addr-util.c | ||
| 22 | @@ -13,6 +13,7 @@ | ||
| 23 | #include "in-addr-util.h" | ||
| 24 | #include "macro.h" | ||
| 25 | #include "parse-util.h" | ||
| 26 | +#include "string-util.h" | ||
| 27 | #include "util.h" | ||
| 28 | |||
| 29 | bool in4_addr_is_null(const struct in_addr *a) { | ||
| 30 | diff --git a/shared/systemd/src/basic/string-util.h b/shared/systemd/src/basic/string-util.h | ||
| 31 | index 38070ab..6b918e0 100644 | ||
| 32 | --- a/shared/systemd/src/basic/string-util.h | ||
| 33 | +++ b/shared/systemd/src/basic/string-util.h | ||
| 34 | @@ -27,6 +27,11 @@ | ||
| 35 | #define strcaseeq(a,b) (strcasecmp((a),(b)) == 0) | ||
| 36 | #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0) | ||
| 37 | |||
| 38 | +/* musl does not know strndupa */ | ||
| 39 | +#if !defined(__GLIBC__) | ||
| 40 | +#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s) | ||
| 41 | +#endif | ||
| 42 | + | ||
| 43 | int strcmp_ptr(const char *a, const char *b) _pure_; | ||
| 44 | |||
| 45 | static inline bool streq_ptr(const char *a, const char *b) { | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb index 4a432be771..90792ff4ee 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb | |||
| @@ -26,15 +26,9 @@ SRC_URI = " \ | |||
| 26 | ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ | 26 | ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ |
| 27 | file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \ | 27 | file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \ |
| 28 | file://0002-Do-not-create-settings-settings-property-documentati.patch \ | 28 | file://0002-Do-not-create-settings-settings-property-documentati.patch \ |
| 29 | file://musl/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch \ | ||
| 30 | file://musl/0002-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \ | ||
| 31 | file://musl/0003-musl-basic.patch \ | ||
| 32 | file://musl/0004-musl-dlopen-configure-ac.patch \ | ||
| 33 | file://musl/0005-musl-network-support.patch \ | ||
| 34 | file://musl/0006-musl-process-util.patch \ | ||
| 35 | file://musl/0007-musl-avoid-further-conflicts-by-including-net-ethern.patch \ | ||
| 36 | file://musl/0008-Add-a-strndupa-replacement-for-musl.patch \ | ||
| 37 | " | 29 | " |
| 30 | SRC_URI_append_libc-musl = " file://musl/0001-Fix-build-with-musl.patch" | ||
| 31 | |||
| 38 | SRC_URI[md5sum] = "10abacaafb162a67d2942adf03e7e9e4" | 32 | SRC_URI[md5sum] = "10abacaafb162a67d2942adf03e7e9e4" |
| 39 | SRC_URI[sha256sum] = "8e962833b6ca03edda1bc57ed6614a7b8c2339531b44acef098d05f2324c5d2c" | 33 | SRC_URI[sha256sum] = "8e962833b6ca03edda1bc57ed6614a7b8c2339531b44acef098d05f2324c5d2c" |
| 40 | 34 | ||
