From a896ca2a8c617e5e00ffd5fc9e69331ad754e5b3 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 15 Feb 2017 17:40:40 +0000 Subject: add arc4random_addrandom sysdep; next batch of types changes. The library isn't supposed to be functional yet: there are still a lot of type mismatches. --- src/libstddjb/alloc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libstddjb/alloc.c') diff --git a/src/libstddjb/alloc.c b/src/libstddjb/alloc.c index 31e3e05..bf291f0 100644 --- a/src/libstddjb/alloc.c +++ b/src/libstddjb/alloc.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include #include #include #include @@ -13,7 +14,7 @@ # define PLM(...) (bprintf(buffer_2, "%s: debug_alloc: ", PROG), bprintf(buffer_2, __VA_ARGS__), buffer_putflush(buffer_2, "\n", 1)) #endif -aligned_char *alloc (unsigned int n) +aligned_char *alloc (size_t n) { register aligned_char *p = n ? (aligned_char *)malloc(n) : (aligned_char *)alloc_0 ; #ifdef DEBUG_ALLOC @@ -37,7 +38,7 @@ void alloc_free (void *p) errno = e ; } -int alloc_realloc (aligned_char **x, unsigned int n) +int alloc_realloc (aligned_char **x, size_t n) { aligned_char *y = n ? (aligned_char *)realloc(*x, n) : (free(*x), alloc_0) ; #ifdef DEBUG_ALLOC -- cgit v1.3.1