diff options
| -rw-r--r-- | meta-multimedia/recipes-multimedia/openal/openal-soft/0001-Add-missing-include-for-malloc-free.patch | 38 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/openal/openal-soft_1.24.3.bb | 5 |
2 files changed, 41 insertions, 2 deletions
diff --git a/meta-multimedia/recipes-multimedia/openal/openal-soft/0001-Add-missing-include-for-malloc-free.patch b/meta-multimedia/recipes-multimedia/openal/openal-soft/0001-Add-missing-include-for-malloc-free.patch new file mode 100644 index 0000000000..cd966c04f7 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/openal/openal-soft/0001-Add-missing-include-for-malloc-free.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From 468b52958ded2dd942386d52e456ed259875b6e3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Chris Robinson <chris.kcat@gmail.com> | ||
| 3 | Date: Fri, 18 Jul 2025 01:57:32 -0700 | ||
| 4 | Subject: [PATCH] Add missing include for malloc/free | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://github.com/kcat/openal-soft/commit/6b69e11867e6498f244da95de7a3d6c25f79f205] | ||
| 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 8 | --- | ||
| 9 | fmt-11.1.1/include/fmt/format.h | 5 +++-- | ||
| 10 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/fmt-11.1.1/include/fmt/format.h b/fmt-11.1.1/include/fmt/format.h | ||
| 13 | index d1b83d18..ae5700ff 100644 | ||
| 14 | --- a/fmt-11.1.1/include/fmt/format.h | ||
| 15 | +++ b/fmt-11.1.1/include/fmt/format.h | ||
| 16 | @@ -44,6 +44,7 @@ | ||
| 17 | # include <cmath> // std::signbit | ||
| 18 | # include <cstddef> // std::byte | ||
| 19 | # include <cstdint> // uint32_t | ||
| 20 | +# include <cstdlib> // std::malloc, std::free | ||
| 21 | # include <cstring> // std::memcpy | ||
| 22 | # include <limits> // std::numeric_limits | ||
| 23 | # include <new> // std::bad_alloc | ||
| 24 | @@ -742,12 +743,12 @@ template <typename T> struct allocator { | ||
| 25 | |||
| 26 | T* allocate(size_t n) { | ||
| 27 | FMT_ASSERT(n <= max_value<size_t>() / sizeof(T), ""); | ||
| 28 | - T* p = static_cast<T*>(malloc(n * sizeof(T))); | ||
| 29 | + T* p = static_cast<T*>(std::malloc(n * sizeof(T))); | ||
| 30 | if (!p) FMT_THROW(std::bad_alloc()); | ||
| 31 | return p; | ||
| 32 | } | ||
| 33 | |||
| 34 | - void deallocate(T* p, size_t) { free(p); } | ||
| 35 | + void deallocate(T* p, size_t) { std::free(p); } | ||
| 36 | }; | ||
| 37 | |||
| 38 | } // namespace detail | ||
diff --git a/meta-multimedia/recipes-multimedia/openal/openal-soft_1.24.3.bb b/meta-multimedia/recipes-multimedia/openal/openal-soft_1.24.3.bb index 4204017c20..a1d2932f93 100644 --- a/meta-multimedia/recipes-multimedia/openal/openal-soft_1.24.3.bb +++ b/meta-multimedia/recipes-multimedia/openal/openal-soft_1.24.3.bb | |||
| @@ -8,8 +8,9 @@ inherit cmake pkgconfig | |||
| 8 | DEPENDS = "zlib libsndfile1" | 8 | DEPENDS = "zlib libsndfile1" |
| 9 | 9 | ||
| 10 | SRCREV = "dc7d7054a5b4f3bec1dc23a42fd616a0847af948" | 10 | SRCREV = "dc7d7054a5b4f3bec1dc23a42fd616a0847af948" |
| 11 | SRC_URI = "git://github.com/kcat/openal-soft.git;protocol=https;branch=master" | 11 | SRC_URI = "git://github.com/kcat/openal-soft.git;protocol=https;branch=master \ |
| 12 | 12 | file://0001-Add-missing-include-for-malloc-free.patch \ | |
| 13 | " | ||
| 13 | 14 | ||
| 14 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa pipewire pulseaudio', d)}" | 15 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa pipewire pulseaudio', d)}" |
| 15 | PACKAGECONFIG[alsa] = "-DALSOFT_BACKEND_ALSA=ON,-DALSOFT_BACKEND_ALSA=OFF,alsa-lib" | 16 | PACKAGECONFIG[alsa] = "-DALSOFT_BACKEND_ALSA=ON,-DALSOFT_BACKEND_ALSA=OFF,alsa-lib" |
