summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/rpc/xdr.h4
-rw-r--r--libc/inet/rpc/auth_none.c4
-rw-r--r--libc/inet/rpc/clnt_perror.c2
-rw-r--r--libc/inet/rpc/clnt_raw.c2
-rw-r--r--libc/inet/rpc/clnt_simple.c2
-rw-r--r--libc/inet/rpc/svc.c4
-rw-r--r--libc/inet/rpc/svc_raw.c2
-rw-r--r--libc/inet/rpc/svc_simple.c4
8 files changed, 12 insertions, 12 deletions
diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h
index 83707cc19..6eaf958bb 100644
--- a/include/rpc/xdr.h
+++ b/include/rpc/xdr.h
@@ -274,9 +274,9 @@ struct xdr_discrim
* in the RPC code will not work on 64bit Solaris platforms !
*/
#define IXDR_GET_LONG(buf) \
- ((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++))
+ ((long)ntohl((u_long)*(*(u_int32_t**)&(buf))++))
#define IXDR_PUT_LONG(buf, v) \
- (*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))
+ (*(*(u_int32_t**)&(buf))++ = (long)htonl((u_long)(v)))
#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG(buf, (long)(v))
diff --git a/libc/inet/rpc/auth_none.c b/libc/inet/rpc/auth_none.c
index b4a341445..b2683a651 100644
--- a/libc/inet/rpc/auth_none.c
+++ b/libc/inet/rpc/auth_none.c
@@ -64,7 +64,7 @@ struct authnone_private_s {
u_int mcnt;
};
#ifdef __UCLIBC_HAS_THREADS__
-#define authnone_private ((struct authnone_private_s *)RPC_THREAD_VARIABLE(authnone_private_s))
+#define authnone_private (*(struct authnone_private_s **)&RPC_THREAD_VARIABLE(authnone_private_s))
#else
static struct authnone_private_s *authnone_private;
#endif
@@ -105,7 +105,7 @@ authnone_marshal (AUTH *client, XDR *xdrs)
{
struct authnone_private_s *ap;
- ap = (struct authnone_private_s *) authnone_private;
+ ap = authnone_private;
if (ap == NULL)
return FALSE;
return (*xdrs->x_ops->x_putbytes) (xdrs, ap->marshalled_client, ap->mcnt);
diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c
index 975075c42..c4b8ee5f6 100644
--- a/libc/inet/rpc/clnt_perror.c
+++ b/libc/inet/rpc/clnt_perror.c
@@ -58,7 +58,7 @@ static char *auth_errmsg (enum auth_stat stat) internal_function;
* buf variable in a few functions. Overriding a global variable
* with a local variable of the same name is a bad idea, anyway.
*/
-#define buf ((char *)RPC_THREAD_VARIABLE(clnt_perr_buf_s))
+#define buf (*(char **)&RPC_THREAD_VARIABLE(clnt_perr_buf_s))
#else
static char *buf;
#endif
diff --git a/libc/inet/rpc/clnt_raw.c b/libc/inet/rpc/clnt_raw.c
index 603423668..a1062109f 100644
--- a/libc/inet/rpc/clnt_raw.c
+++ b/libc/inet/rpc/clnt_raw.c
@@ -62,7 +62,7 @@ struct clntraw_private_s
u_int mcnt;
};
#ifdef __UCLIBC_HAS_THREADS__
-#define clntraw_private ((struct clntraw_private_s *)RPC_THREAD_VARIABLE(clntraw_private_s))
+#define clntraw_private (*(struct clntraw_private_s **)&RPC_THREAD_VARIABLE(clntraw_private_s))
#else
static struct clntraw_private_s *clntraw_private;
#endif
diff --git a/libc/inet/rpc/clnt_simple.c b/libc/inet/rpc/clnt_simple.c
index 425288293..b0af24a98 100644
--- a/libc/inet/rpc/clnt_simple.c
+++ b/libc/inet/rpc/clnt_simple.c
@@ -58,7 +58,7 @@ struct callrpc_private_s
char *oldhost;
};
#ifdef __UCLIBC_HAS_THREADS__
-#define callrpc_private ((struct callrpc_private_s *)RPC_THREAD_VARIABLE(callrpc_private_s))
+#define callrpc_private (*(struct callrpc_private_s **)&RPC_THREAD_VARIABLE(callrpc_private_s))
#else
static struct callrpc_private_s *callrpc_private;
#endif
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
diff --git a/libc/inet/rpc/svc_raw.c b/libc/inet/rpc/svc_raw.c
index 059f9c5ec..05bf3109c 100644
--- a/libc/inet/rpc/svc_raw.c
+++ b/libc/inet/rpc/svc_raw.c
@@ -56,7 +56,7 @@ struct svcraw_private_s
char verf_body[MAX_AUTH_BYTES];
};
#ifdef __UCLIBC_HAS_THREADS__
-#define svcraw_private ((struct svcraw_private_s *)RPC_THREAD_VARIABLE(svcraw_private_s))
+#define svcraw_private (*(struct svcraw_private_s **)&RPC_THREAD_VARIABLE(svcraw_private_s))
#else
static struct svcraw_private_s *svcraw_private;
#endif
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