changeset 108:869d71b4e5da

common: guard against redefinitions of MIN & MAX On Linux, sys/param.h already defines these. Including certain system headers (notably rpc/rpc.h) will cause sys/param.h to get pulled in. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Signed-off-by: Holly Sipek <holly.sipek@gmail.com>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Sat, 17 Oct 2015 16:37:52 -0400
parents 3d3088f7e176
children 4db5838ca7d3
files src/common/include/nomad/types.h
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/common/include/nomad/types.h	Sat Oct 17 16:37:42 2015 -0400
+++ b/src/common/include/nomad/types.h	Sat Oct 17 16:37:52 2015 -0400
@@ -32,8 +32,13 @@
 #include <nomad/vclock.h>
 #include <nomad/malloc.h>
 
+#ifndef MIN
 #define MIN(a, b)	(((a) < (b)) ? (a) : (b))
+#endif
+
+#ifndef MAX
 #define MAX(a, b)	(((a) > (b)) ? (a) : (b))
+#endif
 
 /* object id */
 struct noid {