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 @@ +From 468b52958ded2dd942386d52e456ed259875b6e3 Mon Sep 17 00:00:00 2001 +From: Chris Robinson +Date: Fri, 18 Jul 2025 01:57:32 -0700 +Subject: [PATCH] Add missing include for malloc/free + +Upstream-Status: Backport [https://github.com/kcat/openal-soft/commit/6b69e11867e6498f244da95de7a3d6c25f79f205] +Signed-off-by: Khem Raj +--- + fmt-11.1.1/include/fmt/format.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/fmt-11.1.1/include/fmt/format.h b/fmt-11.1.1/include/fmt/format.h +index d1b83d18..ae5700ff 100644 +--- a/fmt-11.1.1/include/fmt/format.h ++++ b/fmt-11.1.1/include/fmt/format.h +@@ -44,6 +44,7 @@ + # include // std::signbit + # include // std::byte + # include // uint32_t ++# include // std::malloc, std::free + # include // std::memcpy + # include // std::numeric_limits + # include // std::bad_alloc +@@ -742,12 +743,12 @@ template struct allocator { + + T* allocate(size_t n) { + FMT_ASSERT(n <= max_value() / sizeof(T), ""); +- T* p = static_cast(malloc(n * sizeof(T))); ++ T* p = static_cast(std::malloc(n * sizeof(T))); + if (!p) FMT_THROW(std::bad_alloc()); + return p; + } + +- void deallocate(T* p, size_t) { free(p); } ++ void deallocate(T* p, size_t) { std::free(p); } + }; + + } // 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 DEPENDS = "zlib libsndfile1" SRCREV = "dc7d7054a5b4f3bec1dc23a42fd616a0847af948" -SRC_URI = "git://github.com/kcat/openal-soft.git;protocol=https;branch=master" - +SRC_URI = "git://github.com/kcat/openal-soft.git;protocol=https;branch=master \ + file://0001-Add-missing-include-for-malloc-free.patch \ + " PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa pipewire pulseaudio', d)}" PACKAGECONFIG[alsa] = "-DALSOFT_BACKEND_ALSA=ON,-DALSOFT_BACKEND_ALSA=OFF,alsa-lib"