iglunix/gui/qtwebengine/qtwebengine-musl.patch
2021-08-28 09:26:41 +00:00

31 lines
1 KiB
Diff

diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
index 88d1790..ed4c3d4 100644
--- a/src/buildtools/configure.json
+++ b/src/buildtools/configure.json
@@ -270,8 +270,10 @@
"test": {
"include": "features.h",
"tail": [
+ "#if defined(__GLIBC__)",
"#if __GLIBC__ < 2 || __GLIBC_MINOR__ < 17",
"#error glibc versions below 2.17 are not supported",
+ "#endif",
"#endif"
]
}
diff --git a/src/core/api/qtbug-61521.cpp b/src/core/api/qtbug-61521.cpp
index 002a1af..01c81ac 100644
--- a/src/core/api/qtbug-61521.cpp
+++ b/src/core/api/qtbug-61521.cpp
@@ -111,7 +111,11 @@ SHIM_HIDDEN void* ShimValloc(size_t size) {
}
SHIM_HIDDEN void* ShimPvalloc(size_t size) {
+#if defined(__GLIBC__)
return pvalloc(size);
+#else
+ return valloc((size+4095)&~4095);
+#endif
}
SHIM_HIDDEN int ShimPosixMemalign(void** r, size_t a, size_t s) {