int pthread_join(pthread_t thread, void **retval);
According to the man page pthread_join should use a pointer to a pointer as argument to store the return value.I cant understand why its designed that way.Is it sufficient to use a pointer variable in that ?
If I have understood your query clearly.. you should use like this..