termux-packages/packages/redis/server.c.patch
Leonid Pliushch edd6a13d5f redis: update patches
Someone will need to fix threading, as using pthread_kill(t, 0) will
most likely cause issues.

Android does not provide pthread_cancel and similar.
2020-11-22 17:09:46 +00:00

15 lines
601 B
Diff

diff -uNr redis-6.0.9/src/server.c redis-6.0.9.mod/src/server.c
--- redis-6.0.9/src/server.c 2020-10-27 07:12:01.000000000 +0000
+++ redis-6.0.9.mod/src/server.c 2020-11-22 17:03:52.033053867 +0000
@@ -2813,8 +2813,10 @@
* can work reliably (default cancelability type is PTHREAD_CANCEL_DEFERRED).
* Needed for pthread_cancel used by the fast memory test used by the crash report. */
void makeThreadKillable(void) {
+#ifndef __ANDROID__
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
+#endif
}
void initServer(void) {