From 377c7157a8802c289c5560f1a2ecd1030d571e7d Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 18 Feb 2004 01:15:34 +0000 Subject: Alexandre Oliva writes: While testing the FR-V code with GCC mainline, I ran into some problems in the RPC code. It relies on a GCC extension that is no longer available, namely, the result of a cast is no longer considered an lvalue. This patch enables the code to compile. I haven't been able to test RPC though, especially in a multi-threaded environment. --- libc/inet/rpc/svc_simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/inet/rpc/svc_simple.c') diff --git a/libc/inet/rpc/svc_simple.c b/libc/inet/rpc/svc_simple.c index b2cc6ee5d..81dead7a1 100644 --- a/libc/inet/rpc/svc_simple.c +++ b/libc/inet/rpc/svc_simple.c @@ -64,7 +64,7 @@ struct proglst_ struct proglst_ *p_nxt; }; #ifdef __UCLIBC_HAS_THREADS__ -#define proglst ((struct proglst_ *)RPC_THREAD_VARIABLE(svcsimple_proglst_s)) +#define proglst (*(struct proglst_ **)&RPC_THREAD_VARIABLE(svcsimple_proglst_s)) #else static struct proglst_ *proglst; #endif @@ -72,7 +72,7 @@ static struct proglst_ *proglst; static void universal (struct svc_req *rqstp, SVCXPRT *transp_s); #ifdef __UCLIBC_HAS_THREADS__ -#define transp ((SVCXPRT *)RPC_THREAD_VARIABLE(svcsimple_transp_s)) +#define transp (*(SVCXPRT **)&RPC_THREAD_VARIABLE(svcsimple_transp_s)) #else static SVCXPRT *transp; #endif -- cgit v1.2.3