summaryrefslogtreecommitdiffstats
path: root/src/guestfs.c
diff options
context:
space:
mode:
authorRichard Jones <rich@koneko.home.annexia.org>2010-03-21 17:16:04 +0000
committerRichard Jones <rich@koneko.home.annexia.org>2010-03-22 10:41:45 +0000
commitb369fa6f91185efd4503aba4565671b8a0380d23 (patch)
treedb3e6b51f4a020ff4cd05b061e243b45f8407a30 /src/guestfs.c
parenta28791d6ac818761405fe898c600bafd7137b857 (diff)
downloadlibguestfs-b369fa6f91185efd4503aba4565671b8a0380d23.tar.gz
libguestfs-b369fa6f91185efd4503aba4565671b8a0380d23.tar.xz
libguestfs-b369fa6f91185efd4503aba4565671b8a0380d23.zip
Mac OS X: Fix HAVE_GNU_CALLOC so it works when __GLIBC__ is not defined.
Diffstat (limited to 'src/guestfs.c')
-rw-r--r--src/guestfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/guestfs.c b/src/guestfs.c
index 01642b48..61e93022 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -439,7 +439,11 @@ guestfs_safe_malloc (guestfs_h *g, size_t nbytes)
/* Technically we should add an autoconf test for this, testing for the desired
functionality, like what's done in gnulib, but for now, this is fine. */
+#if defined(__GLIBC__)
#define HAVE_GNU_CALLOC (__GLIBC__ >= 2)
+#else
+#define HAVE_GNU_CALLOC 0
+#endif
/* Allocate zeroed memory for N elements of S bytes, with error
checking. S must be nonzero. */