summaryrefslogtreecommitdiff
path: root/libc/inet/rpc/svc.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-02-18 01:15:34 +0000
committerEric Andersen <andersen@codepoet.org>2004-02-18 01:15:34 +0000
commit377c7157a8802c289c5560f1a2ecd1030d571e7d (patch)
treedbfc05a518799d315e5a9bc070d6a408287a4691 /libc/inet/rpc/svc.c
parentc56735672c2f771e0c9d87480c85b72aa99aceec (diff)
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.
Diffstat (limited to 'libc/inet/rpc/svc.c')
-rw-r--r--libc/inet/rpc/svc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c
index af4c6979f..6e1d8dc3d 100644
--- a/libc/inet/rpc/svc.c
+++ b/libc/inet/rpc/svc.c
@@ -48,7 +48,7 @@
#include <sys/poll.h>
#ifdef __UCLIBC_HAS_THREADS__
-#define xports ((SVCXPRT **)RPC_THREAD_VARIABLE(svc_xports_s))
+#define xports (*(SVCXPRT ***)&RPC_THREAD_VARIABLE(svc_xports_s))
#else
static SVCXPRT **xports;
#endif
@@ -67,7 +67,7 @@ struct svc_callout {
void (*sc_dispatch) (struct svc_req *, SVCXPRT *);
};
#ifdef __UCLIBC_HAS_THREADS__
-#define svc_head ((struct svc_callout *)RPC_THREAD_VARIABLE(svc_head_s))
+#define svc_head (*(struct svc_callout **)&RPC_THREAD_VARIABLE(svc_head_s))
#else
static struct svc_callout *svc_head;
#endif