#include "pthread.h" #include int *__errno_location(void) { struct __pthread *self = pthread_self(); return &self->thr_errno; }