Commit f4fcd00d authored by Timo Teräs's avatar Timo Teräs

main/uclibc: fix fork visibility to non-hidden

makes daemon() and other uclibc functions that use fork() work
on pthread applications. fixes #54, #73.
parent e8e42874
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=uclibc
pkgver=0.9.30.1
pkgrel=13
pkgrel=14
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-hidden.diff
uclibc-fork-hook.diff
uclibc-getaddrinfo-netlink.diff
uclibcconfig
......@@ -68,6 +69,7 @@ bcd1c4c9c87f092fb4631559e6ec13ba 0001-linuxthreads-fixes-from-Will-Newton-will.
bbb8475963e791f596c34c81ef5583d7 uclibc-resolv-cname-fix.diff
0b3966ab7774ac42ecf34a7b596c661b uclibc-i386-floating-stacks.diff
60738298e377295d359768a09adac0bb ppoll.patch
220260c979eca4558827d0e7ec8aa8b6 uclibc-fork-hidden.diff
55bb709f5efd937df323f0d39a202cfd uclibc-fork-hook.diff
a7310494a8073ebd43e1d437657532ef uclibc-getaddrinfo-netlink.diff
0a87f57d3e5001027f43b7c959d96319 uclibcconfig
......
Index: uClibc-0.9.30.1/libc/misc/wordexp/wordexp.c
===================================================================
--- uClibc-0.9.30.1.orig/libc/misc/wordexp/wordexp.c 2009-08-03 16:13:20.000000000 +0300
+++ uClibc-0.9.30.1/libc/misc/wordexp/wordexp.c 2009-08-03 16:14:23.000000000 +0300
@@ -56,7 +56,7 @@
libc_hidden_proto(atoi)
libc_hidden_proto(fnmatch)
libc_hidden_proto(pipe)
-libc_hidden_proto(fork)
+//libc_hidden_proto(fork)
libc_hidden_proto(open)
libc_hidden_proto(close)
libc_hidden_proto(read)
Index: uClibc-0.9.30.1/libc/stdio/popen.c
===================================================================
--- uClibc-0.9.30.1.orig/libc/stdio/popen.c 2009-08-03 16:13:20.000000000 +0300
+++ uClibc-0.9.30.1/libc/stdio/popen.c 2009-08-03 16:14:23.000000000 +0300
@@ -42,7 +42,7 @@
# define vfork fork
# define VFORK_LOCK ((void) 0)
# define VFORK_UNLOCK ((void) 0)
-libc_hidden_proto(fork)
+//libc_hidden_proto(fork)
#endif
#ifndef VFORK_LOCK
Index: uClibc-0.9.30.1/libc/stdlib/system.c
===================================================================
--- uClibc-0.9.30.1.orig/libc/stdlib/system.c 2009-08-03 16:13:20.000000000 +0300
+++ uClibc-0.9.30.1/libc/stdlib/system.c 2009-08-03 16:14:23.000000000 +0300
@@ -21,7 +21,7 @@
#include <sys/syscall.h>
#ifndef __NR_vfork
# define vfork fork
-libc_hidden_proto(fork)
+//libc_hidden_proto(fork)
#endif
extern __typeof(system) __libc_system;
Index: uClibc-0.9.30.1/libc/stdlib/unix_grantpt.c
===================================================================
--- uClibc-0.9.30.1.orig/libc/stdlib/unix_grantpt.c 2009-08-03 16:13:21.000000000 +0300
+++ uClibc-0.9.30.1/libc/stdlib/unix_grantpt.c 2009-08-03 16:14:23.000000000 +0300
@@ -39,7 +39,7 @@
libc_hidden_proto(chmod)
libc_hidden_proto(chown)
libc_hidden_proto(vfork)
-libc_hidden_proto(fork)
+//libc_hidden_proto(fork)
libc_hidden_proto(stat)
libc_hidden_proto(ptsname_r)
libc_hidden_proto(execle)
Index: uClibc-0.9.30.1/libc/sysdeps/linux/common/fork.c
===================================================================
--- uClibc-0.9.30.1.orig/libc/sysdeps/linux/common/fork.c 2009-08-03 16:10:51.000000000 +0300
+++ uClibc-0.9.30.1/libc/sysdeps/linux/common/fork.c 2009-08-03 16:14:23.000000000 +0300
@@ -16,9 +16,9 @@
extern __typeof(fork) __libc_fork;
#define __NR___libc_fork __NR_fork
_syscall0(pid_t, __libc_fork)
-libc_hidden_proto(fork)
+////libc_hidden_proto(fork)
weak_alias(__libc_fork,fork)
-libc_hidden_weak(fork)
+//libc_hidden_weak(fork)
#endif
#elif defined __UCLIBC_HAS_STUBS__
@@ -28,7 +28,7 @@
__set_errno(ENOSYS);
return -1;
}
-libc_hidden_proto(fork)
+////libc_hidden_proto(fork)
weak_alias(__libc_fork,fork)
libc_hidden_weak(fork)
link_warning(fork, "fork: this function is not implemented on no-mmu systems")
Index: uClibc-0.9.30.1/libc/sysdeps/linux/common/vfork.c
===================================================================
--- uClibc-0.9.30.1.orig/libc/sysdeps/linux/common/vfork.c 2009-08-03 16:13:20.000000000 +0300
+++ uClibc-0.9.30.1/libc/sysdeps/linux/common/vfork.c 2009-08-03 16:14:23.000000000 +0300
@@ -12,7 +12,7 @@
#ifdef __ARCH_USE_MMU__
#ifdef __NR_fork
-libc_hidden_proto(fork)
+//libc_hidden_proto(fork)
extern __typeof(vfork) __vfork attribute_hidden;
pid_t __vfork(void)
Index: uClibc-0.9.30.1/libc/sysdeps/linux/cris/fork.c
===================================================================
--- uClibc-0.9.30.1.orig/libc/sysdeps/linux/cris/fork.c 2009-08-03 16:13:20.000000000 +0300
+++ uClibc-0.9.30.1/libc/sysdeps/linux/cris/fork.c 2009-08-03 16:14:23.000000000 +0300
@@ -14,6 +14,6 @@
R0&-1==R0, and the child gets R0&0==0. */
/* i dunno what the blurb above is useful for. we just return. */
__asm__("ret\n\tnop");
-libc_hidden_proto(fork)
+//libc_hidden_proto(fork)
weak_alias(__libc_fork,fork)
libc_hidden_weak(fork)
Index: uClibc-0.9.30.1/libc/unistd/daemon.c
===================================================================
--- uClibc-0.9.30.1.orig/libc/unistd/daemon.c 2009-08-03 16:13:21.000000000 +0300
+++ uClibc-0.9.30.1/libc/unistd/daemon.c 2009-08-03 16:14:23.000000000 +0300
@@ -54,7 +54,7 @@
libc_hidden_proto(dup2)
libc_hidden_proto(setsid)
libc_hidden_proto(chdir)
-libc_hidden_proto(fork)
+//libc_hidden_proto(fork)
int daemon( int nochdir, int noclose )
{
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