summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/stdlib/system.c2
-rw-r--r--libc/sysdeps/linux/common/fork.c2
-rw-r--r--libc/sysdeps/linux/common/pause.c1
-rw-r--r--libc/sysdeps/linux/common/select.c4
-rw-r--r--libc/sysdeps/linux/common/wait.c1
-rw-r--r--libpthread/nptl/init.c2
-rw-r--r--libpthread/nptl/sysdeps/pthread/sigaction.c4
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/fork.c2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c1
9 files changed, 10 insertions, 9 deletions
diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
index 4f54d1df9..acd86761d 100644
--- a/libc/stdlib/system.c
+++ b/libc/stdlib/system.c
@@ -17,6 +17,7 @@
#include <sysdep-cancel.h>
#endif
+extern __typeof(system) __libc_system;
/* TODO: the cancellable version breaks on sparc currently,
* need to figure out why still
@@ -28,7 +29,6 @@
# define vfork fork
#endif
-extern __typeof(system) __libc_system;
int __libc_system(const char *command)
{
int wait_val, pid;
diff --git a/libc/sysdeps/linux/common/fork.c b/libc/sysdeps/linux/common/fork.c
index 26a20d987..2e730064f 100644
--- a/libc/sysdeps/linux/common/fork.c
+++ b/libc/sysdeps/linux/common/fork.c
@@ -10,10 +10,10 @@
#include <sys/syscall.h>
#include <unistd.h>
+extern __typeof(fork) __libc_fork;
#ifdef __ARCH_USE_MMU__
#ifdef __NR_fork
-extern __typeof(fork) __libc_fork;
#define __NR___libc_fork __NR_fork
_syscall0(pid_t, __libc_fork)
weak_alias(__libc_fork,fork)
diff --git a/libc/sysdeps/linux/common/pause.c b/libc/sysdeps/linux/common/pause.c
index 132ffa856..33eb409c6 100644
--- a/libc/sysdeps/linux/common/pause.c
+++ b/libc/sysdeps/linux/common/pause.c
@@ -19,6 +19,7 @@
/* Suspend the process until a signal arrives.
This always returns -1 and sets errno to EINTR. */
+extern __typeof(pause) __libc_pause;
int
__libc_pause (void)
{
diff --git a/libc/sysdeps/linux/common/select.c b/libc/sysdeps/linux/common/select.c
index 0c2d91984..029fb08a0 100644
--- a/libc/sysdeps/linux/common/select.c
+++ b/libc/sysdeps/linux/common/select.c
@@ -23,7 +23,7 @@ extern __typeof(select) __libc_select;
#if !defined(__NR__newselect) && !defined(__NR_select) && defined __USE_XOPEN2K
# define __NR___libc_pselect6 __NR_pselect6
-_syscall6(int, __libc_pselect6, int, n, fd_set *, readfds, fd_set *, writefds,
+static _syscall6(int, __libc_pselect6, int, n, fd_set *, readfds, fd_set *, writefds,
fd_set *, exceptfds, const struct timespec *, timeout,
const sigset_t *, sigmask)
@@ -71,7 +71,7 @@ int __libc_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
# define __NR___syscall_select __NR_select
#endif
-_syscall5(int, __syscall_select, int, n, fd_set *, readfds,
+static _syscall5(int, __syscall_select, int, n, fd_set *, readfds,
fd_set *, writefds, fd_set *, exceptfds, struct timeval *, timeout);
int __libc_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
diff --git a/libc/sysdeps/linux/common/wait.c b/libc/sysdeps/linux/common/wait.c
index d4b79bd37..9b529eb21 100644
--- a/libc/sysdeps/linux/common/wait.c
+++ b/libc/sysdeps/linux/common/wait.c
@@ -10,6 +10,7 @@
#include <sys/wait.h>
#include <sys/resource.h>
+extern __typeof(wait) __libc_wait;
/* Wait for a child to die. When one does, put its status in *STAT_LOC
* and return its process ID. For errors, return (pid_t) -1. */
#ifdef __UCLIBC_HAS_THREADS_NATIVE__
diff --git a/libpthread/nptl/init.c b/libpthread/nptl/init.c
index b70de84fd..3e5fde337 100644
--- a/libpthread/nptl/init.c
+++ b/libpthread/nptl/init.c
@@ -34,8 +34,8 @@
#include <smp.h>
#include <lowlevellock.h>
#include <bits/kernel-features.h>
-
#include <stdio.h>
+extern __typeof(sigaction) __libc_sigaction;
/* Size and alignment of static TLS block. */
size_t __static_tls_size;
diff --git a/libpthread/nptl/sysdeps/pthread/sigaction.c b/libpthread/nptl/sysdeps/pthread/sigaction.c
index 20cff8941..e004a3903 100644
--- a/libpthread/nptl/sysdeps/pthread/sigaction.c
+++ b/libpthread/nptl/sysdeps/pthread/sigaction.c
@@ -26,9 +26,7 @@
#define LIBC_SIGACTION 1
#include <sigaction.c>
-int
-sigaction (int sig, const struct sigaction *act, struct sigaction *oact);
-
+extern __typeof(sigaction) __sigaction;
int
__sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c b/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
index 2d4cae224..6ad9053b7 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
@@ -58,7 +58,7 @@ fresetlockfiles (void)
#endif
}
-
+extern __typeof(fork) __libc_fork;
pid_t
__libc_fork (void)
{
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
index 96e2bf439..d4de3cd9e 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
@@ -46,6 +46,7 @@ really_getpid (pid_t oldval)
}
#endif
+extern __typeof(getpid) __getpid;
pid_t
__getpid (void)
{