From 0af1b01b5ca61422c779b40a9c99cd0b29b40049 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sat, 24 Oct 2009 14:10:41 +0000 Subject: Support for multiple local sockets (ie: INET + INET6) * Allows us to make ipv6 queries. --- common/compat.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'common/compat.c') 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 -- cgit v1.2.3