From 9bb314355374b94fb6b6aadd86759045acdf3ef3 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Thu, 3 Mar 2022 02:09:27 +0800 Subject: [PATCH] base: Fix OpenWrt build with use_allocator_shim=false --- src/base/process/memory_linux.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/base/process/memory_linux.cc b/src/base/process/memory_linux.cc index 8973d7c27f..5026fff769 100644 --- a/src/base/process/memory_linux.cc +++ b/src/base/process/memory_linux.cc @@ -18,6 +18,13 @@ #include "base/threading/thread_restrictions.h" #include "build/build_config.h" +#if !BUILDFLAG(USE_ALLOCATOR_SHIM) && defined(LIBC_GLIBC) +extern "C" { +void* __libc_malloc(size_t size); +void __libc_free(void* ptr); +} // extern "C" +#endif + namespace base { namespace {