From f1e5a13516d1b7472206fad8c4c20c249c60f1db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Thu, 2 Apr 2015 10:37:05 +1100 Subject: [PATCH] src: wrap MIN definition in infdef Some platforms already define this; avoid redefining if that's the case. Found on OpenBSD 5.6. PR-URL: https://github.com/iojs/io.js/pull/1322 Reviewed-By: Brian White Reviewed-By: Ben Noordhuis --- src/node_file.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node_file.cc b/src/node_file.cc index 37dbb77f93eed2..d466acc65a9dc0 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -39,7 +39,9 @@ using v8::Object; using v8::String; using v8::Value; -#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#ifndef MIN +# define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif #define TYPE_ERROR(msg) env->ThrowTypeError(msg)