summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/signal/sigaction.c5
-rw-r--r--src/thread/pthread_self.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/signal/sigaction.c b/src/signal/sigaction.c
index 18956c6b..5bc9383b 100644
--- a/src/signal/sigaction.c
+++ b/src/signal/sigaction.c
@@ -3,9 +3,13 @@
#include <errno.h>
#include "syscall.h"
#include "pthread_impl.h"
+#include "libc.h"
void __restore(), __restore_rt();
+static pthread_t dummy(void) { return 0; }
+weak_alias(dummy, __pthread_self_def);
+
int __libc_sigaction(int sig, const struct sigaction *sa, struct sigaction *old)
{
struct {
@@ -23,6 +27,7 @@ int __libc_sigaction(int sig, const struct sigaction *sa, struct sigaction *old)
pksa = (long)&ksa;
}
if (old) pkold = (long)&kold;
+ __pthread_self_def();
if (syscall(SYS_rt_sigaction, sig, pksa, pkold, 8))
return -1;
if (old) {
diff --git a/src/thread/pthread_self.c b/src/thread/pthread_self.c
index cc2ddfb7..51f12bb3 100644
--- a/src/thread/pthread_self.c
+++ b/src/thread/pthread_self.c
@@ -19,7 +19,7 @@ static int init_main_thread()
return 0;
}
-pthread_t pthread_self()
+pthread_t __pthread_self_def()
{
static int init, failed;
if (!init) {
@@ -31,4 +31,5 @@ pthread_t pthread_self()
return __pthread_self();
}
-weak_alias(pthread_self, __pthread_self_init);
+weak_alias(__pthread_self_def, pthread_self);
+weak_alias(__pthread_self_def, __pthread_self_init);