aboutsummaryrefslogtreecommitdiffstats
path: root/main/uclibc/uclibc-fork-hidden.diff
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-08-03 16:23:21 +0300
committerTimo Teras <timo.teras@iki.fi>2009-08-03 16:23:21 +0300
commitf4fcd00de91020243328f71d7c37b952c5808f1d (patch)
tree80668d32b3a6665c7021805e52d44f4832a9d682 /main/uclibc/uclibc-fork-hidden.diff
parente8e42874675e17dac966d236a90c79afc1be7ec5 (diff)
downloadaports-f4fcd00de91020243328f71d7c37b952c5808f1d.tar.bz2
aports-f4fcd00de91020243328f71d7c37b952c5808f1d.tar.xz
main/uclibc: fix fork visibility to non-hidden
makes daemon() and other uclibc functions that use fork() work on pthread applications. fixes #54, #73.
Diffstat (limited to 'main/uclibc/uclibc-fork-hidden.diff')
-rw-r--r--main/uclibc/uclibc-fork-hidden.diff115
1 files changed, 115 insertions, 0 deletions
diff --git a/main/uclibc/uclibc-fork-hidden.diff b/main/uclibc/uclibc-fork-hidden.diff
new file mode 100644
index 0000000000..2a0543380e
--- /dev/null
+++ b/main/uclibc/uclibc-fork-hidden.diff
@@ -0,0 +1,115 @@
+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 )
+ {