--- src/lib/libthread_xu/sys/Attic/thr_error.c 2005/02/01 12:38:27 1.1 +++ src/lib/libthread_xu/sys/Attic/thr_error.c 2005/03/29 19:26:20 1.2 @@ -34,6 +34,7 @@ * $FreeBSD: src/lib/libpthread/sys/thr_error.c,v 1.7 2003/04/23 21:46:50 deischen Exp $ * $DragonFly$ */ +#include #include #include "libc_private.h" #include "thr_private.h" @@ -44,9 +45,9 @@ extern int errno; int * __error(void) { - struct pthread *curthread = _get_curthread(); + struct pthread *curthread = tls_get_curthread(); - if (curthread != NULL && curthread != _thr_initial) + if (curthread != _thr_initial) return (&curthread->error); else return (&errno);