From 9fa4711e364e9aa779d6b8d12220bbb63dbb1f3d Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 18:45:19 +0100 Subject: guard IPv6 stuff disable IPv6 related stuff if feature is disabled. Signed-off-by: Peter S. Mazinger --- libc/inet/rpc/sa_len.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libc/inet/rpc') diff --git a/libc/inet/rpc/sa_len.c b/libc/inet/rpc/sa_len.c index 3b37eba44..5f258db1f 100644 --- a/libc/inet/rpc/sa_len.c +++ b/libc/inet/rpc/sa_len.c @@ -52,10 +52,14 @@ int __libc_sa_len (sa_family_t af) #endif case AF_INET: return sizeof (struct sockaddr_in); +#ifdef __UCLIBC_HAS_IPV6__ case AF_INET6: return sizeof (struct sockaddr_in6); +#endif +#if 0 case AF_IPX: return sizeof (struct sockaddr_ipx); +#endif case AF_LOCAL: return sizeof (struct sockaddr_un); } -- cgit v1.2.3 From 2a19c1339d6bf46fe0f90fbd4e8dca6646d111ed Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Wed, 23 Feb 2011 00:14:42 +0100 Subject: Implement ffsl and ffsll. This imports and adapts ffsll.c from glibc. The same mechanism as in glibc is used to choose between ffs and ffsll to implement ffsl. The single user in libc is changed to use the hidden version __libc_ffs. Signed-off-by: Bernd Schmidt Acked-by: Bernhard Reutner-Fischer --- libc/inet/rpc/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/inet/rpc') diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c index 0f5300c8b..03b406200 100644 --- a/libc/inet/rpc/svc.c +++ b/libc/inet/rpc/svc.c @@ -452,7 +452,7 @@ svc_getreqset (fd_set *readfds) setsize = _rpc_dtablesize (); maskp = (u_int32_t *) readfds->fds_bits; for (sock = 0; sock < setsize; sock += 32) - for (mask = *maskp++; (bit = ffs (mask)); mask ^= (1 << (bit - 1))) + for (mask = *maskp++; (bit = __libc_ffs (mask)); mask ^= (1 << (bit - 1))) svc_getreq_common (sock + bit - 1); } libc_hidden_def(svc_getreqset) -- cgit v1.2.3 From cda3f2658389330999ad35390ed2676a7dc37325 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sun, 6 Mar 2011 17:08:38 +0100 Subject: simplify ffs* code Remove __libc_ffs*, unneeded Signed-off-by: Peter S. Mazinger --- libc/inet/rpc/svc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libc/inet/rpc') diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c index 03b406200..b28485de3 100644 --- a/libc/inet/rpc/svc.c +++ b/libc/inet/rpc/svc.c @@ -41,6 +41,7 @@ #include #include +#include #include "rpc_private.h" #include #include @@ -452,7 +453,7 @@ svc_getreqset (fd_set *readfds) setsize = _rpc_dtablesize (); maskp = (u_int32_t *) readfds->fds_bits; for (sock = 0; sock < setsize; sock += 32) - for (mask = *maskp++; (bit = __libc_ffs (mask)); mask ^= (1 << (bit - 1))) + for (mask = *maskp++; (bit = ffs (mask)); mask ^= (1 << (bit - 1))) svc_getreq_common (sock + bit - 1); } libc_hidden_def(svc_getreqset) -- cgit v1.2.3 From cb96f5c1b34a36864b0da389599b95408cc9b4a2 Mon Sep 17 00:00:00 2001 From: Mark Salter Date: Thu, 9 Sep 2010 14:40:03 -0400 Subject: sunrpc: fix spurious fall-through Fix spurious fall-through. Signed-off-by: Mark Salter Signed-off-by: Bernd Schmidt --- libc/inet/rpc/clnt_tcp.c | 1 + libc/inet/rpc/clnt_udp.c | 1 + libc/inet/rpc/clnt_unix.c | 1 + 3 files changed, 3 insertions(+) (limited to 'libc/inet/rpc') diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c index d01fc80d5..d8d7bb359 100644 --- a/libc/inet/rpc/clnt_tcp.c +++ b/libc/inet/rpc/clnt_tcp.c @@ -402,6 +402,7 @@ clnttcp_control (CLIENT *cl, int request, char *info) /* This will set the xid of the NEXT call */ *(u_long *)ct->ct_mcall = htonl (*(u_long *)info - 1); /* decrement by 1 as clnttcp_call() increments once */ + break; case CLGET_VERS: /* * This RELIES on the information that, in the call body, diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c index fe8b7f8e6..aca3e337b 100644 --- a/libc/inet/rpc/clnt_udp.c +++ b/libc/inet/rpc/clnt_udp.c @@ -554,6 +554,7 @@ clntudp_control (CLIENT *cl, int request, char *info) /* This will set the xid of the NEXT call */ *(u_long *)cu->cu_outbuf = htonl(*(u_long *)info - 1); /* decrement by 1 as clntudp_call() increments once */ + break; case CLGET_VERS: /* * This RELIES on the information that, in the call body, diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c index c7756f700..9870149e9 100644 --- a/libc/inet/rpc/clnt_unix.c +++ b/libc/inet/rpc/clnt_unix.c @@ -377,6 +377,7 @@ clntunix_control (CLIENT *cl, int request, char *info) /* This will set the xid of the NEXT call */ *(u_long *) ct->ct_mcall = htonl (*(u_long *)info - 1); /* decrement by 1 as clntunix_call() increments once */ + break; case CLGET_VERS: /* * This RELIES on the information that, in the call body, -- cgit v1.2.3