diff options
Diffstat (limited to 'libc/inet/rpc/rpc_thread.c')
-rw-r--r-- | libc/inet/rpc/rpc_thread.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c index 75a5d0f4d..be820599b 100644 --- a/libc/inet/rpc/rpc_thread.c +++ b/libc/inet/rpc/rpc_thread.c @@ -9,8 +9,13 @@ /* Variable used in non-threaded applications or for the first thread. */ static struct rpc_thread_variables __libc_tsd_RPC_VARS_mem; +#ifdef __PTHREADS_NATIVE__ +static struct rpc_thread_variables *__libc_tsd_RPC_VARS = + &__libc_tsd_RPC_VARS_mem; +#else static struct rpc_thread_variables *__libc_tsd_RPC_VARS_data = &__libc_tsd_RPC_VARS_mem; +#endif /* * Task-variable destructor @@ -77,7 +82,11 @@ __rpc_thread_variables (void) if (tvp != NULL) __libc_tsd_set (RPC_VARS, tvp); else +#ifdef __PTHREADS_NATIVE__ + tvp = __libc_tsd_RPC_VARS; +#else tvp = __libc_tsd_RPC_VARS_data; +#endif } } return tvp; |