aboutsummaryrefslogtreecommitdiff
path: root/repos/extra/nodejs/libc++-malloc.patch
blob: 64ff335cd3c44b35de49d6a6dc86f960d6d2527a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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..cd00164 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
@@ -44,6 +44,7 @@
 #  include <cmath>    // std::signbit
 #  include <cstddef>  // std::byte
 #  include <cstdint>  // uint32_t
+#  include <cstdlib>  // std::malloc, std::free
 #  include <cstring>  // std::memcpy
 #  include <limits>   // std::numeric_limits
 #  include <new>      // std::bad_alloc
@@ -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