summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/_spinlock_stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/_spinlock_stub.c')
-rw-r--r--lib/libc/gen/_spinlock_stub.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/gen/_spinlock_stub.c b/lib/libc/gen/_spinlock_stub.c
index 071fc20..78c8dea 100644
--- a/lib/libc/gen/_spinlock_stub.c
+++ b/lib/libc/gen/_spinlock_stub.c
@@ -41,9 +41,10 @@
* Declare weak definitions in case the application is not linked
* with libpthread.
*/
-#pragma weak _atomic_lock=_atomic_lock_stub
-#pragma weak _spinlock=_spinlock_stub
-#pragma weak _spinlock_debug=_spinlock_debug_stub
+__weak_reference(_atomic_lock_stub, _atomic_lock);
+__weak_reference(_spinlock_stub, _spinlock);
+__weak_reference(_spinlock_debug_stub, _spinlock_debug);
+
/*
* This function is a stub for the _atomic_lock function in libpthread.
OpenPOWER on IntegriCloud