diff options
Diffstat (limited to 'libc/sysdeps')
-rw-r--r-- | libc/sysdeps/linux/common/initfini.c | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/sh/__init_brk.c | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/sh/brk.c | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/sh/sbrk.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/common/initfini.c b/libc/sysdeps/linux/common/initfini.c index c2e82d591..4a6ebee75 100644 --- a/libc/sysdeps/linux/common/initfini.c +++ b/libc/sysdeps/linux/common/initfini.c @@ -84,6 +84,7 @@ call_gmon_start(void) SECTION (".init") HIDDEN(_init) +extern void i_am_not_a_leaf (void); extern void _init (void); void _init (void) { @@ -101,7 +102,6 @@ void _init (void) /* Let GCC know that _init is not a leaf function by having a dummy * function call here. We arrange for this call to be omitted from * either crt file. */ - extern void i_am_not_a_leaf (void); i_am_not_a_leaf (); } asm ("\n/*@_init_PROLOG_UNPAUSES*/"); @@ -121,6 +121,7 @@ asm ("\n/*@_fini_PROLOG_BEGINS*/"); SECTION (".fini") HIDDEN(_fini) +extern void i_am_not_a_leaf2 (void); extern void _fini (void); void _fini (void) { @@ -134,7 +135,6 @@ void _fini (void) /* Let GCC know that _fini is not a leaf function by having a dummy function call here. We arrange for this call to be omitted from either crt file. */ - extern void i_am_not_a_leaf2 (void); i_am_not_a_leaf2 (); } diff --git a/libc/sysdeps/linux/sh/__init_brk.c b/libc/sysdeps/linux/sh/__init_brk.c index 93aa37d8e..7f9cd3c31 100644 --- a/libc/sysdeps/linux/sh/__init_brk.c +++ b/libc/sysdeps/linux/sh/__init_brk.c @@ -1,8 +1,8 @@ /* From libc-5.3.12 */ +#include <errno.h> #include <unistd.h> #include <sys/syscall.h> -#include <errno.h> void * ___brk_addr = 0; @@ -10,7 +10,7 @@ void * ___brk_addr = 0; _syscall1(void *, _brk, void *, ptr); int -__init_brk () +__init_brk (void) { if (___brk_addr == 0) { diff --git a/libc/sysdeps/linux/sh/brk.c b/libc/sysdeps/linux/sh/brk.c index c7943c1fd..4f97fb084 100644 --- a/libc/sysdeps/linux/sh/brk.c +++ b/libc/sysdeps/linux/sh/brk.c @@ -1,12 +1,12 @@ /* From libc-5.3.12 */ +#include <errno.h> #include <unistd.h> #include <sys/syscall.h> -#include <errno.h> extern void * ___brk_addr; -extern int __init_brk (); +extern int __init_brk (void); extern void *_brk(void *ptr); int brk(void * end_data_seg) diff --git a/libc/sysdeps/linux/sh/sbrk.c b/libc/sysdeps/linux/sh/sbrk.c index 3dd5a46f0..c39d60063 100644 --- a/libc/sysdeps/linux/sh/sbrk.c +++ b/libc/sysdeps/linux/sh/sbrk.c @@ -1,8 +1,8 @@ /* From libc-5.3.12 */ +#include <errno.h> #include <unistd.h> #include <sys/syscall.h> -#include <errno.h> extern void * ___brk_addr; @@ -14,7 +14,7 @@ sbrk(intptr_t increment) { if (__init_brk () == 0) { - void * tmp = ___brk_addr+increment; + char * tmp = (char*)___brk_addr+increment; ___brk_addr = _brk(tmp); if (___brk_addr == tmp) return tmp-increment; |