git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a28791d
)
Mac OS X: Fix HAVE_GNU_CALLOC so it works when __GLIBC__ is not defined.
author
Richard Jones
<rich@koneko.home.annexia.org>
Sun, 21 Mar 2010 17:16:04 +0000
(17:16 +0000)
committer
Richard Jones
<rich@koneko.home.annexia.org>
Mon, 22 Mar 2010 10:41:45 +0000
(10:41 +0000)
src/guestfs.c
patch
|
blob
|
history
diff --git
a/src/guestfs.c
b/src/guestfs.c
index
01642b4
..
61e9302
100644
(file)
--- 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. */