[PATCH 1/2] Add MIN() macro

alexl at redhat.com alexl at redhat.com
Thu May 23 11:31:07 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 06476cc..8f96016 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