Mi sbaglio o dovresti scrivere

int res = pthread_create(&IDthread, NULL, thread_func, (void *) &temp_sd);