libtirpc: fix build with ndk-r23

This commit is contained in:
Henrik Grimler 2021-09-22 16:30:10 +02:00
parent fd0015b9dd
commit 19270b5750
3 changed files with 14 additions and 33 deletions

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Transport Independent RPC library"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.3.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/sourceforge/libtirpc/libtirpc-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=245895caf066bec5e3d4375942c8cb4366adad184c29c618d97f724ea309ee17
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-gssapi"

View File

@ -1,33 +0,0 @@
diff -uNr libtirpc-1.2.6/src/svc.c libtirpc-1.2.6.mod/src/svc.c
--- libtirpc-1.2.6/src/svc.c 2020-04-07 16:24:34.000000000 +0300
+++ libtirpc-1.2.6.mod/src/svc.c 2020-06-07 03:10:30.231611990 +0300
@@ -630,6 +630,29 @@
svc_getreqset (&readfds);
}
+#ifdef __ANDROID__
+static int ffsl(int i)
+{
+ static const unsigned char table[] =
+ {
+ 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
+ };
+ unsigned int a;
+ unsigned int x = i & -i;
+
+ a = x <= 0xffff ? (x <= 0xff ? 0 : 8) : (x <= 0xffffff ? 16 : 24);
+
+ return table[x >> a] + a;
+}
+#endif
+
void
svc_getreqset (readfds)
fd_set *readfds;

View File

@ -0,0 +1,13 @@
--- ../clnt_bcast.c.orig 2021-09-22 16:24:18.434244238 +0200
+++ ./src/clnt_bcast.c 2021-09-22 16:24:38.977948416 +0200
@@ -69,10 +69,6 @@
#define INITTIME 4000 /* Time to wait initially */
#define WAITTIME 8000 /* Maximum time to wait */
-# define POLLRDNORM 0x040 /* Normal data may be read. */
-# define POLLRDBAND 0x080 /* Priority data may be read. */
-
-
/*
* If nettype is NULL, it broadcasts on all the available