diff options
Diffstat (limited to 'lib/libc/sys/__error.c')
-rw-r--r-- | lib/libc/sys/__error.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/libc/sys/__error.c b/lib/libc/sys/__error.c index c3f59f8..329d124 100644 --- a/lib/libc/sys/__error.c +++ b/lib/libc/sys/__error.c @@ -32,14 +32,17 @@ __FBSDID("$FreeBSD$"); extern int errno; -/* - * Declare a weak reference in case the application is not linked - * with libpthread. - */ -__weak_reference(__error_unthreaded, __error); - int * __error_unthreaded(void) { return(&errno); } + +int *(*__error_selector)(void) = __error_unthreaded; + +int * +__error(void) +{ + + return (__error_selector()); +} |