From e29b6f9974bcad9a1e97493979f261cdb4cf4ea3 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Mon, 27 Jun 2022 19:43:25 +0200 Subject: [PATCH] add epoll_create fallback which is missing in API<21 --- jni/dc_wrapper.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jni/dc_wrapper.c b/jni/dc_wrapper.c index 8bca6e06c..d834589f1 100644 --- a/jni/dc_wrapper.c +++ b/jni/dc_wrapper.c @@ -7,6 +7,15 @@ #include "deltachat-core-rust/deltachat-ffi/deltachat.h" +#if __ANDROID_API__ < 21 +#include +int epoll_create1(int flags) { + int fd = epoll_create(1000); + return fd; +} +#endif + + static dc_msg_t* get_dc_msg(JNIEnv *env, jobject obj);