vcpkg/ports/capnproto/001-fix-android.patch

17 lines
577 B
Diff

diff --git a/c++/src/kj/async-unix.h b/c++/src/kj/async-unix.h
index e66ad8e4..fe8d803c 100644
--- a/c++/src/kj/async-unix.h
+++ b/c++/src/kj/async-unix.h
@@ -34,7 +34,10 @@
KJ_BEGIN_HEADER
#if !defined(KJ_USE_EPOLL) && !defined(KJ_USE_KQUEUE)
-#if __linux__
+
+// Android NDK less than API version 23 doesn't have sigtimedwait
+// sigtimedwait is used in async-unix.c++ if KJ_USE_EPOLL is defined
+#if __linux__ && !(__ANDROID__ && __ANDROID_API__ < 23)
// Default to epoll on Linux.
#define KJ_USE_EPOLL 1
#elif __APPLE__ || __FreeBSD__ || __NetBSD__ || __DragonFly__