diff --git a/src/system/kernel/lib/Jamfile b/src/system/kernel/lib/Jamfile index 44de4de928..a9ddd72887 100644 --- a/src/system/kernel/lib/Jamfile +++ b/src/system/kernel/lib/Jamfile @@ -27,7 +27,7 @@ SEARCH_SOURCE += [ FDirName $(posixSources) unistd ] ; KernelMergeObject kernel_posix.o : # main - kerrno.c + kernel_errno.c dirent.c poll.c utime.c diff --git a/src/system/kernel/lib/kernel_errno.c b/src/system/kernel/lib/kernel_errno.c new file mode 100644 index 0000000000..87c4c11cb1 --- /dev/null +++ b/src/system/kernel/lib/kernel_errno.c @@ -0,0 +1,23 @@ +/* + * Copyright 2003-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved. + * Distributed under the terms of the MIT License. + */ + + +#include "thread.h" + +#include + + +/*! + Kernel space storage for "errno", located in the thread structure + (user "errno" can't be changed from kernel internal POSIX calls) +*/ +int * +_errnop(void) +{ + struct thread *thread = thread_get_current_thread(); + + return &thread->kernel_errno; +} + diff --git a/src/system/libroot/posix/kerrno.c b/src/system/libroot/posix/kerrno.c deleted file mode 100644 index 289ede41ae..0000000000 --- a/src/system/libroot/posix/kerrno.c +++ /dev/null @@ -1,21 +0,0 @@ -/* -** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. -** Distributed under the terms of the OpenBeOS License. -*/ - -/* Kernel space storage for "errno", located in the thread structure - * (user "errno" can't be changed from kernel internal POSIX calls) - */ - -#include -#include "thread.h" - - -int * -_errnop(void) -{ - struct thread *thread = thread_get_current_thread(); - - return &thread->kernel_errno; -} -