diff mbox

mtd-utils: dont redefine MIN()

Message ID 1285911861-9621-1-git-send-email-vapier@gentoo.org
State Accepted, archived
Commit ee3c2bef131ff1d6723b66d5cec3c8738954b407
Headers show

Commit Message

Mike Frysinger Oct. 1, 2010, 5:44 a.m. UTC
Some C library headers will define MIN(), so add an #ifndef check.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 include/common.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff mbox

Patch

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]))