Browse Source

nptl/errno: Use a separate __errno_location for libpthread.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj 13 years ago
parent
commit
913b76abdd

+ 5 - 1
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;
 }

+ 1 - 0
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 \

+ 1 - 0
libpthread/nptl/errno_location.c

@@ -0,0 +1 @@
+#include <libc/misc/internals/__errno_location.c>