about summary refs log tree commit diff
path: root/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/rpc_thread.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/sunrpc/rpc_thread.c b/sunrpc/rpc_thread.c
index 7a9cc9d62f..796bf086fc 100644
--- a/sunrpc/rpc_thread.c
+++ b/sunrpc/rpc_thread.c
@@ -10,7 +10,7 @@
 
 /* Variable used in non-threaded applications or for the first thread.  */
 static struct rpc_thread_variables __libc_tsd_RPC_VARS_mem;
-__libc_tsd_define (, RPC_VARS)
+__libc_tsd_define (, struct rpc_thread_variables *, RPC_VARS)
 
 /*
  * Task-variable destructor
@@ -18,7 +18,8 @@ __libc_tsd_define (, RPC_VARS)
 void __attribute__ ((section ("__libc_thread_freeres_fn")))
 __rpc_thread_destroy (void)
 {
-	struct rpc_thread_variables *tvp = __libc_tsd_get (RPC_VARS);
+	struct rpc_thread_variables *tvp
+	  = __libc_tsd_get (struct rpc_thread_variables *, RPC_VARS);
 
 	if (tvp != NULL) {
 		__rpc_thread_svc_cleanup ();
@@ -33,7 +34,7 @@ __rpc_thread_destroy (void)
 		free (tvp->svc_pollfd_s);
 		if (tvp != &__libc_tsd_RPC_VARS_mem)
 			free (tvp);
-		__libc_tsd_set (RPC_VARS, NULL);
+		__libc_tsd_set (struct rpc_thread_variables *, RPC_VARS, NULL);
 	}
 }
 #ifdef _LIBC_REENTRANT
@@ -48,7 +49,8 @@ text_set_element (__libc_subfreeres, __rpc_thread_destroy);
 static void
 rpc_thread_multi (void)
 {
-  __libc_tsd_set (RPC_VARS, &__libc_tsd_RPC_VARS_mem);
+  __libc_tsd_set (struct rpc_thread_variables *, RPC_VARS,
+		  &__libc_tsd_RPC_VARS_mem);
 }
 
 
@@ -58,16 +60,18 @@ __rpc_thread_variables (void)
 	__libc_once_define (static, once);
 	struct rpc_thread_variables *tvp;
 
-	tvp = __libc_tsd_get (RPC_VARS);
+	tvp = __libc_tsd_get (struct rpc_thread_variables *, RPC_VARS);
 	if (tvp == NULL) {
 		__libc_once (once, rpc_thread_multi);
-		tvp = __libc_tsd_get (RPC_VARS);
+		tvp = __libc_tsd_get (struct rpc_thread_variables *, RPC_VARS);
 		if (tvp == NULL) {
 			tvp = calloc (1, sizeof *tvp);
 			if (tvp != NULL)
-				__libc_tsd_set (RPC_VARS, tvp);
+				__libc_tsd_set (struct rpc_thread_variables *,
+						RPC_VARS, tvp);
 			else
-				tvp = __libc_tsd_get (RPC_VARS);
+				tvp = __libc_tsd_get (struct rpc_thread_variables *,
+						      RPC_VARS);
 		}
 	}
 	return tvp;