diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2012-03-08 19:27:05 +0100 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2012-03-08 19:28:59 +0100 |
commit | fe50b676bc905c527254d0bbd1f7c36d41512efe (patch) | |
tree | 6370b395a9757b76f81fc22275ca91a28d9c33d3 /src | |
parent | 9d5d3a7fd45265358069f0077857da1d7afaad61 (diff) | |
download | tor-fe50b676bc905c527254d0bbd1f7c36d41512efe.tar.gz tor-fe50b676bc905c527254d0bbd1f7c36d41512efe.zip |
Fix compile warnings in openbsd malloc
Diffstat (limited to 'src')
-rw-r--r-- | src/common/OpenBSD_malloc_Linux.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/OpenBSD_malloc_Linux.c b/src/common/OpenBSD_malloc_Linux.c index 445135c6bb..92ca9c0066 100644 --- a/src/common/OpenBSD_malloc_Linux.c +++ b/src/common/OpenBSD_malloc_Linux.c @@ -285,6 +285,8 @@ static void *imalloc(size_t size); static void ifree(void *ptr); static void *irealloc(void *ptr, size_t size); static void *malloc_bytes(size_t size); +void *memalign(size_t boundary, size_t size); +size_t malloc_good_size(size_t size); /* * Function for page directory lookup. @@ -1980,10 +1982,11 @@ static int ispowerof2 (size_t a) { int posix_memalign(void **memptr, size_t alignment, size_t size) { void *r; + size_t max; if ((alignment < PTR_SIZE) || (alignment%PTR_SIZE != 0)) return EINVAL; if (!ispowerof2(alignment)) return EINVAL; if (alignment < malloc_minsize) alignment = malloc_minsize; - size_t max = alignment > size ? alignment : size; + max = alignment > size ? alignment : size; if (alignment <= malloc_pagesize) r = malloc(max); else { |