aboutsummaryrefslogtreecommitdiffstats
path: root/community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2018-11-09 13:12:14 +0000
committerTimo Teräs <timo.teras@iki.fi>2018-11-09 13:21:55 +0000
commit157372b0708efca4eace0b554228ce22d7dce4ff (patch)
tree1bee49152d19d4f759cba5a3604f29460e19e690 /community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch
parent0da19cce01c8b0cd59063889fd2fb5c7fa107012 (diff)
downloadaports-157372b0708efca4eace0b554228ce22d7dce4ff.tar.bz2
aports-157372b0708efca4eace0b554228ce22d7dce4ff.tar.xz
community/qt5-qtwebengine: fix build
- fix the musl dispatch patch not to use dlopen() which can call malloc - add ffmpeg4 build fix
Diffstat (limited to 'community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch')
-rw-r--r--community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch26
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 86e09d5cfd..1258d4f3c4 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"
+