I know from this answer that pthread_t is struct pthread* on Linux. But I get the error:
a.c:35:60: error: invalid use of undefined type ‘struct pthread’
35 | printf("%ld: %ld\n", e, ((struct pthread*)(newthread))->tid);
While in gdb I can do p ((struct pthread*)(newthread))->tid and it works well.
How can I do it in code?