diff options
Diffstat (limited to 'meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0029-shared-Do-not-use-malloc_info-on-musl.patch')
-rw-r--r-- | meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0029-shared-Do-not-use-malloc_info-on-musl.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0029-shared-Do-not-use-malloc_info-on-musl.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0029-shared-Do-not-use-malloc_info-on-musl.patch new file mode 100644 index 0000000000..8e386551a1 --- /dev/null +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0029-shared-Do-not-use-malloc_info-on-musl.patch @@ -0,0 +1,50 @@ +From 9430646e72ea5d260ade300038a6d976fecf7da5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 2 Aug 2023 12:20:40 -0700 +Subject: [PATCH 4/4] shared: Do not use malloc_info on musl + +Upstream-Status: Inappropriate [musl-specific] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/shared/bus-util.c | 5 +++-- + src/shared/common-signal.c | 4 ++-- + 2 files changed, 5 insertions(+), 4 deletions(-) + +--- a/src/shared/bus-util.c ++++ b/src/shared/bus-util.c +@@ -617,15 +617,16 @@ static int method_dump_memory_state_by_f + _cleanup_close_ int fd = -EBADF; + size_t dump_size; + FILE *f; +- int r; ++ int r = 0; + + assert(message); + + f = memstream_init(&m); + if (!f) + return -ENOMEM; +- ++#ifdef __GLIBC__ + r = RET_NERRNO(malloc_info(/* options= */ 0, f)); ++#endif + if (r < 0) + return r; + +--- a/src/shared/common-signal.c ++++ b/src/shared/common-signal.c +@@ -65,12 +65,12 @@ int sigrtmin18_handler(sd_event_source * + log_oom(); + break; + } +- ++#ifdef __GLIBC__ + if (malloc_info(0, f) < 0) { + log_error_errno(errno, "Failed to invoke malloc_info(): %m"); + break; + } +- ++#endif + (void) memstream_dump(LOG_INFO, &m); + break; + } |