termux-packages/ndk_patches_unified/sys-select.h.patch

23 lines
902 B
Diff

Mosh needs fd_set to be const*. And native code used by the nio4r gem (used by Rails 5) needs fd_mask.
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/select.h ./usr/include/sys/select.h
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/select.h 2017-06-07 01:07:52.000000000 +0200
+++ ./usr/include/sys/select.h 2017-06-18 02:06:53.359009782 +0200
@@ -38,6 +38,7 @@
__BEGIN_DECLS
#define FD_SETSIZE 1024
+typedef unsigned long fd_mask;
#define NFDBITS (8 * sizeof(unsigned long))
#define __FDSET_LONGS (FD_SETSIZE/NFDBITS)
@@ -62,7 +63,7 @@
#if __ANDROID_API__ >= 21
void __FD_CLR_chk(int, fd_set*, size_t) __INTRODUCED_IN(21);
void __FD_SET_chk(int, fd_set*, size_t) __INTRODUCED_IN(21);
-int __FD_ISSET_chk(int, fd_set*, size_t) __INTRODUCED_IN(21);
+int __FD_ISSET_chk(int, fd_set const*, size_t) __INTRODUCED_IN(21);
#endif /* __ANDROID_API__ >= 21 */