summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/linux/common/Makefile.in21
-rw-r--r--libc/sysdeps/linux/common/__syscall_fcntl.c2
-rw-r--r--libc/sysdeps/linux/common/getcwd.c2
-rw-r--r--libc/sysdeps/linux/common/open64.c2
-rw-r--r--libc/sysdeps/linux/common/wait4.c3
5 files changed, 21 insertions, 9 deletions
diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
index 2775a91fc..26560e84d 100644
--- a/libc/sysdeps/linux/common/Makefile.in
+++ b/libc/sysdeps/linux/common/Makefile.in
@@ -14,9 +14,20 @@ ifeq ($(EXCLUDE_BRK),y)
CSRC:=$(filter-out sbrk.c,$(CSRC))
endif
+COMMON_SSP:=ssp.c ssp-local.c
+
+# full list
+#COMMON_NO_MULTI:=getcwd.c getrlimit.c getrlimit64.c setrlimit.c setrlimit64.c getpriority.c getpriority64.c setpriority.c getrusage.c wait4.c getitimer.c setitimer.c open.c open64.c uname.c __syscall_fcntl.c __syscall_fcntl64.c
+#COMMON_NO_MULTI:=getcwd.c getrlimit.c getrlimit64.c setrlimit.c setrlimit64.c getpriority.c setpriority.c getrusage.c wait4.c getitimer.c setitimer.c open.c uname.c __syscall_fcntl.c __syscall_rt_sigaction.c
+COMMON_NO_MULTI:=getrlimit.c getrlimit64.c setrlimit.c setrlimit64.c getpriority.c setpriority.c getrusage.c getitimer.c setitimer.c uname.c __syscall_rt_sigaction.c
+
ifneq ($(UCLIBC_HAS_SSP),y)
-CSRC:=$(filter-out ssp-local.c,$(CSRC))
-CSRC:=$(filter-out ssp.c,$(CSRC))
+CSRC:=$(filter-out $(COMMON_SSP),$(CSRC))
+endif
+
+ifneq ($(DOMULTI),n)
+CSRC:=$(filter-out $(COMMON_NO_MULTI),$(CSRC))
+CSRC:=$(filter-out $(COMMON_SSP),$(CSRC))
endif
# fails for some reason
@@ -34,9 +45,9 @@ libc-a-y+=$(COMMON_OBJ)
libc-so-y+=$(COMMON_OBJ:.o=.os)
libc-nonshared-$(UCLIBC_HAS_SSP)+=$(COMMON_OUT)/ssp-local.os
-#libc-multi-y+=$(filter-out $(COMMON_DIR)/ssp.c,$(COMMON_SRC))
-#libc-nomulti-$(UCLIBC_HAS_SSP)+=$(COMMON_OUT)/ssp.o
-libc-nomulti-y+=$(COMMON_OBJ)
+libc-multi-y+=$(COMMON_SRC)
+libc-nomulti-y+=$(patsubst %.c,$(COMMON_OUT)/%.o,$(COMMON_NO_MULTI))
+libc-nomulti-$(UCLIBC_HAS_SSP)+=$(patsubst %.c,$(COMMON_OUT)/%.o,$(COMMON_SSP))
objclean-y+=common_objclean
diff --git a/libc/sysdeps/linux/common/__syscall_fcntl.c b/libc/sysdeps/linux/common/__syscall_fcntl.c
index e4257b0c8..e2215b59a 100644
--- a/libc/sysdeps/linux/common/__syscall_fcntl.c
+++ b/libc/sysdeps/linux/common/__syscall_fcntl.c
@@ -12,7 +12,7 @@
#include <fcntl.h>
#if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
-extern int __libc_fcntl64(int fd, int cmd, long arg);
+extern int __libc_fcntl64(int fd, int cmd, ...);
#endif
#define __NR___syscall_fcntl __NR_fcntl
diff --git a/libc/sysdeps/linux/common/getcwd.c b/libc/sysdeps/linux/common/getcwd.c
index a1de4510c..c6a2fc005 100644
--- a/libc/sysdeps/linux/common/getcwd.c
+++ b/libc/sysdeps/linux/common/getcwd.c
@@ -153,7 +153,7 @@ int __syscall_getcwd(char * buf, unsigned long size)
#endif
-char *getcwd(char *buf, int size)
+char *getcwd(char *buf, size_t size)
{
int ret;
char *path;
diff --git a/libc/sysdeps/linux/common/open64.c b/libc/sysdeps/linux/common/open64.c
index 543aa138f..d9a27a7bc 100644
--- a/libc/sysdeps/linux/common/open64.c
+++ b/libc/sysdeps/linux/common/open64.c
@@ -26,7 +26,7 @@
#endif
#ifdef __UCLIBC_HAS_LFS__
-extern int __libc_open (__const char *file, int oflag, mode_t mode);
+extern int __libc_open (__const char *file, int oflag, ...);
/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
a third argument is the file protection. */
diff --git a/libc/sysdeps/linux/common/wait4.c b/libc/sysdeps/linux/common/wait4.c
index db60e167d..a48a519ae 100644
--- a/libc/sysdeps/linux/common/wait4.c
+++ b/libc/sysdeps/linux/common/wait4.c
@@ -8,12 +8,13 @@
*/
#include "syscalls.h"
+#include <sys/resource.h>
#define __NR___syscall_wait4 __NR_wait4
static inline _syscall4(int, __syscall_wait4, __kernel_pid_t, pid,
int *, status, int, opts, void *, rusage);
-int wait4(pid_t pid, int *status, int opts, void *rusage)
+int wait4(pid_t pid, int *status, int opts, struct rusage *rusage)
{
return (__syscall_wait4(pid, status, opts, rusage));
}