From 6c5a1f2eaac709694035ce71f06d487e2ae4853a Mon Sep 17 00:00:00 2001
From: Eric Andersen <andersen@codepoet.org>
Date: Mon, 1 Sep 2003 23:55:15 +0000
Subject: Use "__pthread_once", since that is weak and present in both glibc
 and uClibc.

---
 test/dlopen/dltest.c  | 2 +-
 test/dlopen/libtest.c | 8 ++------
 2 files changed, 3 insertions(+), 7 deletions(-)

(limited to 'test')

diff --git a/test/dlopen/dltest.c b/test/dlopen/dltest.c
index 244f3b76b..230f7fd1d 100644
--- a/test/dlopen/dltest.c
+++ b/test/dlopen/dltest.c
@@ -29,7 +29,7 @@ int main(int argc, char **argv)
 	}
 
 	mydltest(&value1, &value2);
-	printf("dltest: __pthread_return_0=%p\n", value1);
+	printf("dltest: __pthread_once=%p\n", value1);
 	printf("dltest: pthread_self=%p\n", value2);
 	if (value1 == value2) {
 	    ret = EXIT_FAILURE;
diff --git a/test/dlopen/libtest.c b/test/dlopen/libtest.c
index cdb37403d..e37f77981 100644
--- a/test/dlopen/libtest.c
+++ b/test/dlopen/libtest.c
@@ -2,15 +2,11 @@
 #include <pthread.h>
 #include <stdint.h>
 
-extern int __pthread_return_0(void);
+extern int __pthread_once(void);
 
 void dltest(uint32_t **value1, uint32_t **value2)
 {
-	*value1 = (uint32_t *) __pthread_return_0;
+	*value1 = (uint32_t *) __pthread_once;
 	*value2 = (uint32_t *) pthread_self;
-#if 0
-	printf("dltest: __pthread_return_0=%p\n", __pthread_return_0);
-	printf("dltest: pthread_self=%p\n", pthread_self);
-#endif
 }
 
-- 
cgit v1.2.3