From ab79ee6808a768bc72cd1158f93ba8a50a0615e5 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 4 Oct 2001 10:08:51 +0000 Subject: Yet more minor cleanups --- libc/inet/resolv.c | 4 ++-- libc/sysdeps/linux/common/syscalls.c | 16 ++++++++++------ libc/sysdeps/linux/i386/brk.c | 5 ++++- 3 files changed, 16 insertions(+), 9 deletions(-) (limited to 'libc') diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index e5558fbde..97e3a3897 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -1132,7 +1132,7 @@ struct netent * getnetbyname(const char * name) #ifdef L_res_init -int res_init() +int res_init(void) { return(0); } @@ -1181,7 +1181,7 @@ int res_query(const char *dname, int class, int type, #ifdef L_gethostbyaddr -struct hostent *gethostbyaddr (const void *addr, __socklen_t len, int type) +struct hostent *gethostbyaddr (const void *addr, socklen_t len, int type) { static struct hostent h; static char namebuf[256]; diff --git a/libc/sysdeps/linux/common/syscalls.c b/libc/sysdeps/linux/common/syscalls.c index 78c1463b0..05179548d 100644 --- a/libc/sysdeps/linux/common/syscalls.c +++ b/libc/sysdeps/linux/common/syscalls.c @@ -282,7 +282,8 @@ _syscall0(void, sync); //#define __NR_kill 37 #ifdef L_kill -//#include +#include +#undef kill _syscall2(int, kill, pid_t, pid, int, sig); #endif @@ -498,8 +499,8 @@ _syscall0(pid_t, setsid); //#define __NR_sigaction 67 #ifdef L_sigaction -//#include -struct sigaction; +#include +#undef sigaction _syscall3(int, sigaction, int, signum, const struct sigaction *, act, struct sigaction *, oldact); #endif @@ -522,13 +523,15 @@ _syscall2(int, setregid, gid_t, rgid, gid_t, egid); //#define __NR_sigsuspend 72 #ifdef L_sigsuspend -//#include +#include +#undef sigsuspend _syscall1(int, sigsuspend, const sigset_t *, mask); #endif //#define __NR_sigpending 73 #ifdef L_sigpending -//#include +#include +#undef sigpending _syscall1(int, sigpending, sigset_t *, set); #endif @@ -942,7 +945,8 @@ _syscall3(int, mprotect, void *, addr, size_t, len, int, prot); //#define __NR_sigprocmask 126 #ifdef L_sigprocmask -//#include +#include +#undef sigprocmask _syscall3(int, sigprocmask, int, how, const sigset_t *, set, sigset_t *, oldset); #endif diff --git a/libc/sysdeps/linux/i386/brk.c b/libc/sysdeps/linux/i386/brk.c index eca0e8326..9ae565631 100644 --- a/libc/sysdeps/linux/i386/brk.c +++ b/libc/sysdeps/linux/i386/brk.c @@ -21,13 +21,16 @@ #include #include +#ifndef __ptrvalue +#define __ptrvalue +#endif /* This must be initialized data because commons can't have aliases. */ void *___brk_addr = 0; int brk (void *addr) { - void *__unbounded newbrk, *__unbounded scratch; + void *newbrk, *scratch; asm ("movl %%ebx, %1\n" /* Save %ebx in scratch register. */ "movl %3, %%ebx\n" /* Put ADDR in %ebx to be syscall arg. */ -- cgit v1.2.3