Add "#ifndef min" to xz_config.h.
diff --git a/userspace/xz_config.h b/userspace/xz_config.h
index ff90eff..9d714f3 100644
--- a/userspace/xz_config.h
+++ b/userspace/xz_config.h
@@ -32,7 +32,9 @@
 #define memeq(a, b, size) (memcmp(a, b, size) == 0)
 #define memzero(buf, size) memset(buf, 0, size)
 
-#define min(x, y) ((x) < (y) ? (x) : (y))
+#ifndef min
+#	define min(x, y) ((x) < (y) ? (x) : (y))
+#endif
 #define min_t(type, x, y) min(x, y)
 
 /*