diff options
Diffstat (limited to 'debian/patches/8680c74d1bd83b4969c9305171076b36f56d82fa.patch')
-rw-r--r-- | debian/patches/8680c74d1bd83b4969c9305171076b36f56d82fa.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/debian/patches/8680c74d1bd83b4969c9305171076b36f56d82fa.patch b/debian/patches/8680c74d1bd83b4969c9305171076b36f56d82fa.patch new file mode 100644 index 0000000..f7039c7 --- /dev/null +++ b/debian/patches/8680c74d1bd83b4969c9305171076b36f56d82fa.patch @@ -0,0 +1,42 @@ +From 8680c74d1bd83b4969c9305171076b36f56d82fa Mon Sep 17 00:00:00 2001 +From: Wim Taymans <wtaymans@redhat.com> +Date: Wed, 4 Oct 2023 10:59:26 +0200 +Subject: [PATCH] check if malloc_trim() is available + +--- + meson.build | 1 + + src/pipewire/impl-node.c | 5 +++-- + 2 files changed, 4 insertions(+), 2 deletions(-) + +--- a/meson.build ++++ b/meson.build +@@ -401,6 +401,7 @@ + ['reallocarray', '#include <stdlib.h>', ['-D_GNU_SOURCE'], []], + ['sigabbrev_np', '#include <string.h>', ['-D_GNU_SOURCE'], []], + ['XSetIOErrorExitHandler', '#include <X11/Xlib.h>', [], [x11_dep]], ++ ['malloc_trim', '#include <malloc.h>', [], []], + ] + + foreach f : check_functions +--- a/src/pipewire/impl-node.c ++++ b/src/pipewire/impl-node.c +@@ -1874,7 +1874,6 @@ + struct pw_impl_node *follower; + struct pw_context *context = node->context; + bool active, had_driver; +- int res; + + active = node->active; + node->active = false; +@@ -1948,8 +1947,10 @@ + spa_system_close(context->data_system, node->source.fd); + free(impl); + +- res = malloc_trim(0); ++#ifdef HAVE_MALLOC_TRIM ++ int res = malloc_trim(0); + pw_log_debug("malloc_trim(): %d", res); ++#endif + } + + SPA_EXPORT |