From c0e447afd0d4b671fb55948c4cdb4bee543d0b50 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 7 May 2013 18:24:14 +0000 Subject: 2013-05-07 Sebastian Huber * libc/stdlib/__atexit.c (__atexit_lock): Declare. * libc/stdlib/__call_atexit.c (__atexit_lock): Define. --- newlib/libc/stdlib/__atexit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'newlib/libc/stdlib/__atexit.c') diff --git a/newlib/libc/stdlib/__atexit.c b/newlib/libc/stdlib/__atexit.c index 4687d0023..1caf2e56b 100644 --- a/newlib/libc/stdlib/__atexit.c +++ b/newlib/libc/stdlib/__atexit.c @@ -10,7 +10,10 @@ /* Make this a weak reference to avoid pulling in malloc. */ void * malloc(size_t) _ATTRIBUTE((__weak__)); -__LOCK_INIT_RECURSIVE(, __atexit_lock); + +#ifndef __SINGLE_THREAD__ +extern _LOCK_RECURSIVE_T __atexit_lock; +#endif /* * Register a function to be performed at exit or on shared library unload. -- cgit v1.2.3