[git commit master 1/1] nptl/errno: Use a separate __errno_location for libpthread.

Khem Raj raj.khem at gmail.com
Wed Jun 30 11:10:37 UTC 2010


commit: http://git.uclibc.org/uClibc/commit/?id=913b76abdd824ee3a6dbbc1527470ebcb8c06a65
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 libc/misc/internals/__errno_location.c |    6 +++++-
 libpthread/nptl/Makefile.in            |    1 +
 libpthread/nptl/errno_location.c       |    1 +
 3 files changed, 7 insertions(+), 1 deletions(-)
 create mode 100644 libpthread/nptl/errno_location.c

diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c
index 487a9c2..aec7641 100644
--- a/libc/misc/internals/__errno_location.c
+++ b/libc/misc/internals/__errno_location.c
@@ -7,7 +7,11 @@
 #include "internal_errno.h"
 
 /* psm: moved to bits/errno.h: */
-int * weak_const_function __errno_location (void)
+int *
+#ifndef __UCLIBC_HAS_THREADS__
+weak_const_function
+#endif
+__errno_location (void)
 {
     return &errno;
 }
diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in
index 3accff7..da05689 100644
--- a/libpthread/nptl/Makefile.in
+++ b/libpthread/nptl/Makefile.in
@@ -95,6 +95,7 @@ libpthread-routines-y = init vars events version \
 		      pt-raise pt-system \
 		      flockfile ftrylockfile funlockfile \
 		      sigaction \
+		      errno_location \
 		      herrno \
 		      pthread_kill_other_threads \
 		      pthread_getaffinity pthread_setaffinity \
diff --git a/libpthread/nptl/errno_location.c b/libpthread/nptl/errno_location.c
new file mode 100644
index 0000000..7458938
--- /dev/null
+++ b/libpthread/nptl/errno_location.c
@@ -0,0 +1 @@
+#include <libc/misc/internals/__errno_location.c>
-- 
1.7.1



More information about the uClibc-cvs mailing list