[PATCH weston 1/4] Add a MIN macro

Jason Ekstrand jason at jlekstrand.net
Thu Jun 27 18:17:00 PDT 2013


Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
 src/compositor.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/compositor.h b/src/compositor.h
index 45a14d6..60da054 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.2.1



More information about the wayland-devel mailing list