35 lines
942 B
Diff
35 lines
942 B
Diff
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/process/memory_linux.cc
|
|
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/process/memory_linux.cc
|
|
@@ -18,6 +18,13 @@
|
|
#include "base/threading/thread_restrictions.h"
|
|
#include "build/build_config.h"
|
|
|
|
+#if defined(LIBC_GLIBC)
|
|
+extern "C" {
|
|
+extern void *__libc_malloc(size_t size);
|
|
+extern void *__libc_free(void *ptr);
|
|
+}
|
|
+#endif
|
|
+
|
|
namespace base {
|
|
|
|
namespace {
|
|
@@ -112,7 +119,7 @@ bool UncheckedMalloc(size_t size, void**
|
|
defined(TOOLKIT_QT) || !defined(LIBC_GLIBC)
|
|
*result = malloc(size);
|
|
#elif defined(LIBC_GLIBC)
|
|
- *result = __libc_malloc(size);
|
|
+ *result = ::__libc_malloc(size);
|
|
#endif
|
|
return *result != nullptr;
|
|
}
|
|
@@ -123,7 +130,7 @@ void UncheckedFree(void* ptr) {
|
|
#elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC) || defined(TOOLKIT_QT)
|
|
free(ptr);
|
|
#elif defined(LIBC_GLIBC)
|
|
- __libc_free(ptr);
|
|
+ ::__libc_free(ptr);
|
|
#endif
|
|
}
|
|
|