diff options
author | Stef Walter <stef@memberwebs.com> | 2009-10-24 14:10:41 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2009-10-24 14:10:41 +0000 |
commit | 0af1b01b5ca61422c779b40a9c99cd0b29b40049 (patch) | |
tree | 26374207ac7df32b16332090328cd1a99ddeff4f /common/compat.c | |
parent | 54c751ffc4f79dcd916b4dffe690f59615c7146d (diff) |
Support for multiple local sockets (ie: INET + INET6)
* Allows us to make ipv6 queries.
Diffstat (limited to 'common/compat.c')
-rw-r--r-- | common/compat.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/compat.c b/common/compat.c index eda00d0..1d94f1e 100644 --- a/common/compat.c +++ b/common/compat.c @@ -235,6 +235,18 @@ atexitv(voidfunc func, void* data) #endif /* HAVE_ATEXITV */ +#ifndef HAVE_XREALLOC + +void* +xrealloc(void *p, size_t size) +{ + register void* value = realloc(p, size); + if(value == NULL && size) + errx(1, "out of memory"); + return value; +} + +#endif /* HAVE_XREALLOC */ #ifndef HAVE_XCALLOC |