[PATCH] mtd-utils: dont redefine MIN()
Mike Frysinger
vapier at gentoo.org
Fri Oct 1 01:44:21 EDT 2010
Some C library headers will define MIN(), so add an #ifndef check.
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
include/common.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/common.h b/include/common.h
index 6684a73..25abc0c 100644
--- a/include/common.h
+++ b/include/common.h
@@ -33,7 +33,9 @@
extern "C" {
#endif
+#ifndef MIN /* some C lib headers define this for us */
#define MIN(a ,b) ((a) < (b) ? (a) : (b))
+#endif
#define min(a, b) MIN(a, b) /* glue for linux kernel source */
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
--
1.7.3.1
More information about the linux-mtd
mailing list