summaryrefslogtreecommitdiff
path: root/lib/libc/sys/__error.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/sys/__error.c')
-rw-r--r--lib/libc/sys/__error.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/libc/sys/__error.c b/lib/libc/sys/__error.c
index 329d124a16db8..28cc31dde1775 100644
--- a/lib/libc/sys/__error.c
+++ b/lib/libc/sys/__error.c
@@ -32,13 +32,21 @@ __FBSDID("$FreeBSD$");
extern int errno;
-int *
+static int *
__error_unthreaded(void)
{
- return(&errno);
+
+ return (&errno);
}
-int *(*__error_selector)(void) = __error_unthreaded;
+static int *(*__error_selector)(void) = __error_unthreaded;
+
+void
+__set_error_selector(int *(*arg)(void))
+{
+
+ __error_selector = arg;
+}
int *
__error(void)