[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 8/10] Mac OS X: define MAX macro if not already defined.



-- 
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
>From c7648e6d3d32218bc8947f5572c730aeaddb7a49 Mon Sep 17 00:00:00 2001
From: Richard Jones <rich 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]