Files
patches/nodejs/node-v25.8.1-libcxx-fmt-malloc.patch
T
2026-05-26 02:08:47 -05:00

28 lines
1005 B
Diff

diff --git a/deps/LIEF/third-party/spdlog/include/spdlog/fmt/bundled/format.h b/deps/LIEF/third-party/spdlog/include/spdlog/fmt/bundled/format.h
index 50e5714..36268ce 100644
--- a/deps/LIEF/third-party/spdlog/include/spdlog/fmt/bundled/format.h
+++ b/deps/LIEF/third-party/spdlog/include/spdlog/fmt/bundled/format.h
@@ -42,6 +42,7 @@
#ifndef FMT_MODULE
# include <cmath> // std::signbit
+# include <cstdlib> // std::malloc, std::free
# include <cstddef> // std::byte
# include <cstdint> // uint32_t
# include <cstring> // std::memcpy
@@ -744,12 +745,12 @@ template <typename T> struct allocator {
T* allocate(size_t n) {
FMT_ASSERT(n <= max_value<size_t>() / sizeof(T), "");
- T* p = static_cast<T*>(malloc(n * sizeof(T)));
+ T* p = static_cast<T*>(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