diff options
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixThrd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index b95e8f7..b74419b 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -165,8 +165,12 @@ Tcl_JoinThread(threadId, state) { #ifdef TCL_THREADS int result; + unsigned long retcode; - result = pthread_join ((pthread_t) threadId, (VOID**) state); + result = pthread_join((pthread_t) threadId, (void**) &retcode); + if (state) { + *state = (int) retcode; + } return (result == 0) ? TCL_OK : TCL_ERROR; #else return TCL_ERROR; |