[PATCH 2/3] Add MIN() macro

alexl at redhat.com alexl at redhat.com
Thu May 23 10:33:44 PDT 2013


From: Alexander Larsson <alexl at redhat.com>

This will be needed for the version negotiation
---
 src/compositor.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/compositor.h b/src/compositor.h
index 176b501..5ddbc95 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -36,6 +36,10 @@ extern "C" {
 #include "matrix.h"
 #include "config-parser.h"
 
+#ifndef MIN
+#define MIN(x,y) (((x) < (y)) ? (x) : (y))
+#endif
+
 #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
 
 #define container_of(ptr, type, member) ({				\
-- 
1.8.1.4



More information about the wayland-devel mailing list