Commit 7e87c5b7 authored by Timo Teräs's avatar Timo Teräs
Browse files

core/uclibc: fix linuxthreads.new fork hooking

parent 5182c931
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=uclibc
pkgver=0.9.30.1
pkgrel=10
pkgrel=11
pkgdesc="C library for developing embedded Linux systems"
url=http://uclibc.org
license="LGPL-2"
......@@ -19,6 +19,7 @@ source="http://uclibc.org/downloads/$_mynamever.tar.bz2
uclibc-resolv-cname-fix.diff
uclibc-i386-floating-stacks.diff
ppoll.patch
uclibc-fork-hook.diff
uclibcconfig
"
......@@ -60,4 +61,5 @@ bcd1c4c9c87f092fb4631559e6ec13ba 0001-linuxthreads-fixes-from-Will-Newton-will.
bbb8475963e791f596c34c81ef5583d7 uclibc-resolv-cname-fix.diff
0b3966ab7774ac42ecf34a7b596c661b uclibc-i386-floating-stacks.diff
60738298e377295d359768a09adac0bb ppoll.patch
55bb709f5efd937df323f0d39a202cfd uclibc-fork-hook.diff
0a87f57d3e5001027f43b7c959d96319 uclibcconfig"
diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c
index e15b99b..70c750d 100644
--- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c
+++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c
@@ -20,6 +20,7 @@
#include <errno.h>
#include <fork.h>
#include <bits/libc-lock.h>
+#include <internals.h>
struct fork_block __fork_block =
{
@@ -28,3 +29,12 @@ struct fork_block __fork_block =
.parent_list = { &__fork_block.parent_list, &__fork_block.parent_list },
.child_list = { &__fork_block.child_list, &__fork_block.child_list }
};
+
+pid_t
+__libc_fork (void)
+{
+ return __libc_maybe_call2 (pthread_fork, (&__fork_block), ARCH_FORK ());
+}
+weak_alias (__libc_fork, __fork)
+libc_hidden_def (__fork)
+weak_alias (__libc_fork, fork)
diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h
index 85477eb..1e7379e 100644
--- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h
+++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h
@@ -54,5 +54,5 @@ extern int __register_atfork (void (*__prepare) (void),
void *dso_handle);
#ifndef ARCH_FORK
-# define ARCH_FORK() __libc_fork()
+# define ARCH_FORK() INLINE_SYSCALL (fork, 0)
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment