aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch')
-rw-r--r--meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch128
1 files changed, 58 insertions, 70 deletions
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch
index accd2f2569..af6f938ced 100644
--- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch
@@ -1,7 +1,7 @@
-From 7b09945585e6ce65049fa4039f26caee8daa44b9 Mon Sep 17 00:00:00 2001
+From a89c2e6d40606f563467a83fb98933e990e71377 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Tue, 2 Apr 2019 01:34:35 +0200
-Subject: [PATCH 1/2] Fix build with musl - systemd specific
+Subject: [PATCH] Fix build with musl - systemd specific
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -14,27 +14,27 @@ Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
shared/systemd/src/basic/in-addr-util.c | 1 +
- shared/systemd/src/basic/process-util.c | 9 ++++++++
- shared/systemd/src/basic/socket-util.h | 6 +++++
+ shared/systemd/src/basic/process-util.c | 9 +++++++++
+ shared/systemd/src/basic/socket-util.h | 6 ++++++
+ shared/systemd/src/basic/sort-util.h | 27 ++++---------------------
shared/systemd/src/basic/stdio-util.h | 2 ++
shared/systemd/src/basic/string-util.h | 5 +++++
- shared/systemd/src/basic/util.h | 29 +++++--------------------
- 6 files changed, 28 insertions(+), 24 deletions(-)
+ 6 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/shared/systemd/src/basic/in-addr-util.c b/shared/systemd/src/basic/in-addr-util.c
-index 5ced350..c6b52b8 100644
+index 5899f62..0adb248 100644
--- a/shared/systemd/src/basic/in-addr-util.c
+++ b/shared/systemd/src/basic/in-addr-util.c
-@@ -13,6 +13,7 @@
+@@ -14,6 +14,7 @@
#include "in-addr-util.h"
#include "macro.h"
#include "parse-util.h"
+#include "string-util.h"
+ #include "random-util.h"
+ #include "strxcpyx.h"
#include "util.h"
-
- bool in4_addr_is_null(const struct in_addr *a) {
diff --git a/shared/systemd/src/basic/process-util.c b/shared/systemd/src/basic/process-util.c
-index b0afb5c..7adc8bd 100644
+index 7431be3..189060a 100644
--- a/shared/systemd/src/basic/process-util.c
+++ b/shared/systemd/src/basic/process-util.c
@@ -21,6 +21,9 @@
@@ -47,7 +47,7 @@ index b0afb5c..7adc8bd 100644
#if 0 /* NM_IGNORED */
#if HAVE_VALGRIND_VALGRIND_H
#include <valgrind/valgrind.h>
-@@ -1168,11 +1171,13 @@ void reset_cached_pid(void) {
+@@ -1183,11 +1186,13 @@ void reset_cached_pid(void) {
cached_pid = CACHED_PID_UNSET;
}
@@ -61,7 +61,7 @@ index b0afb5c..7adc8bd 100644
pid_t getpid_cached(void) {
static bool installed = false;
-@@ -1201,7 +1206,11 @@ pid_t getpid_cached(void) {
+@@ -1216,7 +1221,11 @@ pid_t getpid_cached(void) {
* only half-documented (glibc doesn't document it but LSB does — though only superficially)
* we'll check for errors only in the most generic fashion possible. */
@@ -74,7 +74,7 @@ index b0afb5c..7adc8bd 100644
cached_pid = CACHED_PID_UNSET;
return new_pid;
diff --git a/shared/systemd/src/basic/socket-util.h b/shared/systemd/src/basic/socket-util.h
-index d2246a8..76f257f 100644
+index 15443f1..4807198 100644
--- a/shared/systemd/src/basic/socket-util.h
+++ b/shared/systemd/src/basic/socket-util.h
@@ -13,6 +13,12 @@
@@ -90,55 +90,13 @@ index d2246a8..76f257f 100644
#include "macro.h"
#include "missing_socket.h"
#include "sparse-endian.h"
-diff --git a/shared/systemd/src/basic/stdio-util.h b/shared/systemd/src/basic/stdio-util.h
-index dc67b6e..6336243 100644
---- a/shared/systemd/src/basic/stdio-util.h
-+++ b/shared/systemd/src/basic/stdio-util.h
-@@ -1,7 +1,9 @@
- /* SPDX-License-Identifier: LGPL-2.1+ */
- #pragma once
+diff --git a/shared/systemd/src/basic/sort-util.h b/shared/systemd/src/basic/sort-util.h
+index e029f86..1e8b6e1 100644
+--- a/shared/systemd/src/basic/sort-util.h
++++ b/shared/systemd/src/basic/sort-util.h
+@@ -5,15 +5,10 @@
-+#if defined(__GLIBC__)
- #include <printf.h>
-+#endif
- #include <stdarg.h>
- #include <stdio.h>
- #include <sys/types.h>
-diff --git a/shared/systemd/src/basic/string-util.h b/shared/systemd/src/basic/string-util.h
-index 38070ab..6b918e0 100644
---- a/shared/systemd/src/basic/string-util.h
-+++ b/shared/systemd/src/basic/string-util.h
-@@ -27,6 +27,11 @@
- #define strcaseeq(a,b) (strcasecmp((a),(b)) == 0)
- #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0)
-
-+/* musl does not know strndupa */
-+#if !defined(__GLIBC__)
-+#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s)
-+#endif
-+
- int strcmp_ptr(const char *a, const char *b) _pure_;
-
- static inline bool streq_ptr(const char *a, const char *b) {
-diff --git a/shared/systemd/src/basic/util.h b/shared/systemd/src/basic/util.h
-index dc33d66..cc768e9 100644
---- a/shared/systemd/src/basic/util.h
-+++ b/shared/systemd/src/basic/util.h
-@@ -27,6 +27,11 @@
#include "macro.h"
- #include "time-util.h"
-
-+#if !defined(__GLIBC__)
-+typedef int (*__compar_fn_t) (const void*, const void*);
-+typedef __compar_fn_t comparison_fn_t;
-+#endif
-+
- size_t page_size(void) _pure_;
- #define PAGE_ALIGN(l) ALIGN_TO((l), page_size())
-
-@@ -66,16 +71,6 @@ int prot_from_flags(int flags) _const_;
- bool in_initrd(void);
- void in_initrd_force(bool value);
-void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
- __compar_d_fn_t compar, void *arg);
@@ -149,14 +107,18 @@ index dc33d66..cc768e9 100644
- int (*_func_)(const typeof(b[0])*, const typeof(b[0])*, typeof(userdata)) = func; \
- xbsearch_r((const void*) _k, (b), (n), sizeof((b)[0]), (__compar_d_fn_t) _func_, userdata); \
- })
--
++#if !defined(__GLIBC__)
++typedef int (*__compar_fn_t) (const void*, const void*);
++typedef __compar_fn_t comparison_fn_t;
++#endif
+
/**
* Normal bsearch requires base to be nonnull. Here were require
- * that only if nmemb > 0.
-@@ -116,20 +111,6 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn
+@@ -54,17 +49,3 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn
+ int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \
qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
})
-
+-
-static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) {
- if (nmemb <= 1)
- return;
@@ -170,10 +132,36 @@ index dc33d66..cc768e9 100644
- int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \
- qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \
- })
--
- /* Normal memcpy requires src to be nonnull. We do nothing if n is 0. */
- static inline void memcpy_safe(void *dst, const void *src, size_t n) {
- if (n == 0)
+diff --git a/shared/systemd/src/basic/stdio-util.h b/shared/systemd/src/basic/stdio-util.h
+index c3b9448..e80a938 100644
+--- a/shared/systemd/src/basic/stdio-util.h
++++ b/shared/systemd/src/basic/stdio-util.h
+@@ -1,7 +1,9 @@
+ /* SPDX-License-Identifier: LGPL-2.1+ */
+ #pragma once
+
++#if defined(__GLIBC__)
+ #include <printf.h>
++#endif
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+diff --git a/shared/systemd/src/basic/string-util.h b/shared/systemd/src/basic/string-util.h
+index b23f4c8..8f2f6e0 100644
+--- a/shared/systemd/src/basic/string-util.h
++++ b/shared/systemd/src/basic/string-util.h
+@@ -27,6 +27,11 @@
+ #define strcaseeq(a,b) (strcasecmp((a),(b)) == 0)
+ #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0)
+
++/* musl does not know strndupa */
++#if !defined(__GLIBC__)
++#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s)
++#endif
++
+ int strcmp_ptr(const char *a, const char *b) _pure_;
+
+ static inline bool streq_ptr(const char *a, const char *b) {
--
-2.20.1
+2.17.1