1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-27 01:07:14 +00:00
termux-packages/disabled-packages/kphp/server-ucontext-portable.h.patch
Tee KOBAYASHI 1bbe66e98a kphp: Disabled
Incompatible with latest libuber-h3. A whole bunch of patches are quite
unmaintainable.

kphp-timelib is also disabled as only kphp depends on it.
2022-11-17 18:08:03 +00:00

22 lines
822 B
Diff

--- a/server/ucontext-portable.h
+++ b/server/ucontext-portable.h
@@ -4,7 +4,7 @@
#pragma once
-#if defined(__x86_64__)
+#if defined(__x86_64__) && !defined(__ANDROID__)
// for x86, we just use makecontext(), ucontext_t and other native functions
#include <ucontext.h>
@@ -14,7 +14,8 @@
#define makecontext_portable makecontext
#define swapcontext_portable swapcontext
-#elif defined(__arm64__)
+#elif defined(__arm64__) || \
+ defined(__ANDROID__) && (defined(__aarch64__) || defined(__x86_64__))
// for M1, we can't use native makecontext() and others: they compile, but hang up when called
// instead, we require the ucontext library: https://github.com/kaniini/libucontext
// see the docs: https://vkcom.github.io/kphp/kphp-internals/developing-and-extending-kphp/compiling-kphp-from-sources.html