]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/unbound/compat/malloc.c
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / unbound / compat / malloc.c
1 /* Just a replacement, if the original malloc is not
2    GNU-compliant. See autoconf documentation. */
3
4 #include "config.h"
5 #undef malloc
6 #include <sys/types.h>
7
8 void *malloc ();
9
10 /* Allocate an N-byte block of memory from the heap.
11    If N is zero, allocate a 1-byte block.  */
12
13 void *
14 rpl_malloc_unbound (size_t n)
15 {
16   if (n == 0)
17     n = 1;
18   return malloc (n);
19 }