summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/sh')
-rw-r--r--libc/sysdeps/linux/sh/Makefile.arch2
-rw-r--r--libc/sysdeps/linux/sh/longjmp.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/sh/Makefile.arch b/libc/sysdeps/linux/sh/Makefile.arch
index 3e32e1095..09d7ecffe 100644
--- a/libc/sysdeps/linux/sh/Makefile.arch
+++ b/libc/sysdeps/linux/sh/Makefile.arch
@@ -9,4 +9,4 @@
CSRC := \
mmap.c pipe.c __init_brk.c brk.c sbrk.c pread_write.c longjmp.c cacheflush.c
-SSRC := setjmp.S __longjmp.S ___fpscr_values.S
+SSRC := setjmp.S __longjmp.S ___fpscr_values.S vfork.S
diff --git a/libc/sysdeps/linux/sh/longjmp.c b/libc/sysdeps/linux/sh/longjmp.c
index dd0616d8a..28ab71515 100644
--- a/libc/sysdeps/linux/sh/longjmp.c
+++ b/libc/sysdeps/linux/sh/longjmp.c
@@ -29,7 +29,9 @@ libc_hidden_proto(sigprocmask)
extern int __longjmp(char *env, int val);
libc_hidden_proto(__longjmp)
+#ifdef __UCLIBC_HAS_THREADS_NATIVE__
extern void _longjmp_unwind (jmp_buf env, int val);
+#endif
/* Set the signal mask to the one specified in ENV, and jump
@@ -39,7 +41,9 @@ void __libc_siglongjmp (sigjmp_buf env, int val)
{
/* Perform any cleanups needed by the frames being unwound. */
+#if __UCLIBC_HAS_THREADS_NATIVE__
_longjmp_unwind (env, val);
+#endif
if (env[0].__mask_was_saved)
/* Restore the saved signal mask. */