[PATCH] Fix libpthread.a

Jakub Jelinek jakub@redhat.com
Fri Aug 25 13:02:00 GMT 2006


Hi!

__libc_pthread_functions is only in shared libs, not *.a.
This patch fixes undefined reference to `__libc_pthread_functions' when
linking statically linked programs.

2006-08-25  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
	Only define ifdef SHARED.

--- libc/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c.jj	2006-08-25 11:01:24.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c	2006-08-25 11:53:28.000000000 +0200
@@ -58,9 +58,10 @@ __libc_pthread_init (ptr, reclaim, funct
 #endif
 }
 
-
+#ifdef SHARED
 libc_freeres_fn (freeres_libptread)
 {
   if (__libc_pthread_functions.ptr_freeres != NULL)
     __libc_pthread_functions.ptr_freeres ();
 }
+#endif

	Jakub



More information about the Libc-hacker mailing list