0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-21 20:56:19 +00:00
termux-packages/disabled-packages/box86/src_mallochook.c.patch
Jia Yuan Lo 514cc2aa72 box86: Disabled
Box86 is designed with glibc in mind so it is expected to not work
great on non-glibc Linux environment. Retire this package until
upstream properly add support for musl libc and maybe bionic libc.

https://github.com/ptitSeb/box86/issues/762
2023-04-08 00:08:54 +08:00

19 lines
374 B
Diff

--- a/src/mallochook.c
+++ b/src/mallochook.c
@@ -208,6 +208,15 @@
#endif
+#if defined(__ANDROID__) && __ANDROID_API__ < 26
+EXPORT void *aligned_alloc(size_t align, size_t size)
+{
+ void *result = NULL;
+ posix_memalign(&result, align, size);
+ return result;
+}
+#endif
+
EXPORT void* valloc(size_t size)
{
return box_memalign(box86_pagesize, size);