diff options
-rw-r--r-- | meta-oe/recipes-extended/minifi-cpp/files/0001-Add-missing-include-for-malloc-free.patch | 38 | ||||
-rw-r--r-- | meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.99.1.bb | 1 |
2 files changed, 39 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/minifi-cpp/files/0001-Add-missing-include-for-malloc-free.patch b/meta-oe/recipes-extended/minifi-cpp/files/0001-Add-missing-include-for-malloc-free.patch new file mode 100644 index 0000000000..e844bf9b7d --- /dev/null +++ b/meta-oe/recipes-extended/minifi-cpp/files/0001-Add-missing-include-for-malloc-free.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From f01a1ae37d3e502a900b5a6cfa5be217003cf7d4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Aug 2025 21:46:26 -0700 | ||
4 | Subject: [PATCH] Add missing include for malloc/free | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | include/fmt/format.h | 5 +++-- | ||
10 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/include/fmt/format.h b/include/fmt/format.h | ||
13 | index 287e7163..0412812f 100644 | ||
14 | --- a/include/fmt/format.h | ||
15 | +++ b/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 | @@ -744,12 +745,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-oe/recipes-extended/minifi-cpp/minifi-cpp_0.99.1.bb b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.99.1.bb index 16dc46275a..0d9a503793 100644 --- a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.99.1.bb +++ b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.99.1.bb | |||
@@ -27,6 +27,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git;protocol=https;branch=mai | |||
27 | file://0006-CMakeLists.txt-do-not-use-ccache.patch \ | 27 | file://0006-CMakeLists.txt-do-not-use-ccache.patch \ |
28 | file://0007-libsodium-aarch64-set-compiler-attributes-after-including-arm_.patch \ | 28 | file://0007-libsodium-aarch64-set-compiler-attributes-after-including-arm_.patch \ |
29 | file://0008-MINIFICPP-2553-CMP0065-OLD-removed-in-cmake-4.0-remo.patch \ | 29 | file://0008-MINIFICPP-2553-CMP0065-OLD-removed-in-cmake-4.0-remo.patch \ |
30 | file://0001-Add-missing-include-for-malloc-free.patch;patchdir=thirdparty/fmt-src \ | ||
30 | file://systemd-volatile.conf \ | 31 | file://systemd-volatile.conf \ |
31 | file://sysvinit-volatile.conf \ | 32 | file://sysvinit-volatile.conf \ |
32 | " | 33 | " |