diff options
Diffstat (limited to 'libc/misc/internals/__errno_location.c')
-rw-r--r-- | libc/misc/internals/__errno_location.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c index 340950037..dec913f30 100644 --- a/libc/misc/internals/__errno_location.c +++ b/libc/misc/internals/__errno_location.c @@ -4,10 +4,16 @@ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ -#include "internal_errno.h" +#include <features.h> +#include <errno.h> + +#ifndef __UCLIBC_HAS_TLS__ +# undef errno +extern int errno; +#endif int *__errno_location(void) { return &errno; } -libc_hidden_weak(__errno_location) +libc_hidden_def(__errno_location) |