diff options
Diffstat (limited to 'community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch')
-rw-r--r-- | community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch b/community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch index 86e09d5cfd3..1258d4f3c42 100644 --- a/community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch +++ b/community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch @@ -1,5 +1,5 @@ ---- qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc 2017-09-19 18:15:15.000000000 +0200 -+++ qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc 2017-10-09 19:35:11.762384809 +0200 +--- qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc ++++ qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc @@ -6,6 +6,7 @@ #include <malloc.h> @@ -8,8 +8,8 @@ // This translation unit defines a default dispatch for the allocator shim which // routes allocations to libc functions. // The code here is strongly inspired from tcmalloc's libc_override_glibc.h. -@@ -59,3 +60,98 @@ - &GlibcGetSizeEstimate, /* get_size_estimate_function */ +@@ -73,3 +74,92 @@ const AllocatorDispatch AllocatorDispatch::default_dispatch = { + nullptr, /* free_definite_size_function */ nullptr, /* next */ }; + @@ -37,18 +37,12 @@ +// resolve the symbols in libc.so +void musl_libc_memory_init(void) +{ -+ void* libc = dlopen("libc", RTLD_LAZY); -+ if (!libc) -+ libc = dlopen("libc.so", RTLD_LAZY); -+ if (!libc) -+ libc = dlopen("libc.so.6", RTLD_LAZY); -+ libc_malloc = (t_libc_malloc) dlsym(libc, "malloc"); -+ libc_calloc = (t_libc_calloc) dlsym(libc, "calloc"); -+ libc_realloc = (t_libc_realloc) dlsym(libc, "realloc"); -+ libc_memalign = (t_libc_memalign) dlsym(libc, "memalign"); -+ libc_free = (t_libc_free) dlsym(libc, "free"); -+ libc_malloc_usable_size = (t_libc_malloc_usable_size) dlsym(libc, "malloc_usable_size"); -+ dlclose(libc); ++ libc_malloc = (t_libc_malloc) dlsym(RTLD_NEXT, "malloc"); ++ libc_calloc = (t_libc_calloc) dlsym(RTLD_NEXT, "calloc"); ++ libc_realloc = (t_libc_realloc) dlsym(RTLD_NEXT, "realloc"); ++ libc_memalign = (t_libc_memalign) dlsym(RTLD_NEXT, "memalign"); ++ libc_free = (t_libc_free) dlsym(RTLD_NEXT, "free"); ++ libc_malloc_usable_size = (t_libc_malloc_usable_size) dlsym(RTLD_NEXT, "malloc_usable_size"); +} +} // extern "C" + |