[Libguestfs] [PATCH 8/10] Mac OS X: define MAX macro if not already defined.
Richard W.M. Jones
rjones at redhat.com
Sun Mar 21 17:25:55 UTC 2010
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
-------------- next part --------------
>From c7648e6d3d32218bc8947f5572c730aeaddb7a49 Mon Sep 17 00:00:00 2001
From: Richard Jones <rich at koneko.home.annexia.org>
Date: Sun, 21 Mar 2010 17:14:37 +0000
Subject: [PATCH 08/10] Mac OS X: define MAX macro if not already defined.
---
src/guestfs.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/guestfs.c b/src/guestfs.c
index 01e37cf..a00e8db 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -96,6 +96,10 @@ static int qemu_supports (guestfs_h *g, const char *option);
#define UNIX_PATH_MAX 108
+#ifndef MAX
+#define MAX(a,b) ((a)>(b)?(a):(b))
+#endif
+
/* Also in guestfsd.c */
#define GUESTFWD_ADDR "10.0.2.4"
#define GUESTFWD_PORT "6666"
--
1.6.4.1
More information about the Libguestfs
mailing list