summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommi Rantala <tt.rantala@gmail.com>2012-09-21 09:29:16 +0300
committerTommi Rantala <tt.rantala@gmail.com>2012-09-28 14:51:22 +0300
commit65f936402d0dd0e62191ed249f86946203476e28 (patch)
treee5f21c58d94f40cf3095cdcec44603a58b6203dc
parent249ff2f840123823ae05d90bf44ba89d744c14c7 (diff)
downloadlibunwind-65f936402d0dd0e62191ed249f86946203476e28.tar.gz
Add arguments to malloc and calloc prototypes in Ltest-nocalloc
-rw-r--r--tests/Ltest-nocalloc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/Ltest-nocalloc.c b/tests/Ltest-nocalloc.c
index 155cce39..fb0c9811 100644
--- a/tests/Ltest-nocalloc.c
+++ b/tests/Ltest-nocalloc.c
@@ -40,17 +40,17 @@ int in_unwind;
void *
calloc(size_t n, size_t s)
{
- static void * (*func)();
+ static void * (*func)(size_t, size_t);
#ifdef __GLIBC__
/* In glibc, dlsym() calls calloc. Calling dlsym(RTLD_NEXT, "calloc") here
causes infinite recursion. Instead, we simply use it by its other
name. */
- extern void *__libc_calloc();
+ extern void *__libc_calloc(size_t, size_t);
func = &__libc_calloc;
#else
if(!func)
- func = (void *(*)()) dlsym(RTLD_NEXT, "calloc");
+ func = dlsym(RTLD_NEXT, "calloc");
#endif
if (in_unwind) {
@@ -64,10 +64,10 @@ calloc(size_t n, size_t s)
void *
malloc(size_t s)
{
- static void * (*func)();
+ static void * (*func)(size_t);
if(!func)
- func = (void *(*)()) dlsym(RTLD_NEXT, "malloc");
+ func = dlsym(RTLD_NEXT, "malloc");
if (in_unwind) {
num_mallocs++;