summaryrefslogtreecommitdiff
path: root/common/compat.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2006-01-28 18:56:51 +0000
committerStef Walter <stef@memberwebs.com>2006-01-28 18:56:51 +0000
commitdd192cc2ac301972f6761f5d6bd3a4c6a46736bf (patch)
tree39d567dff3557a15d95acb4db048b1253d3c6191 /common/compat.c
parent0999545e84b7597e2503fd69f77fb291651b76db (diff)
Add C RRD create tool. See #50
Diffstat (limited to 'common/compat.c')
-rw-r--r--common/compat.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/compat.c b/common/compat.c
index 0c6c833..247560e 100644
--- a/common/compat.c
+++ b/common/compat.c
@@ -230,3 +230,16 @@ atexitv(voidfunc func, void* data)
}
#endif /* HAVE_ATEXITV */
+
+#ifndef HAVE_XCALLOC
+
+void*
+xcalloc(size_t size)
+{
+ register void* value = calloc(1, size);
+ if(value == NULL)
+ errx("out of memory");
+ return value;
+}
+
+#endif /* HAVE_XCALLOC */