From 70e99d6b5725451c1d3fa8554e1195e22f1db44a Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 13 Jul 2017 00:09:31 +0900 Subject: Define `round()` only on WIN32 platform; fix #3741 --- mrbgems/mruby-time/src/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrbgems/mruby-time/src/time.c b/mrbgems/mruby-time/src/time.c index 33755f570..bd72d3bbd 100644 --- a/mrbgems/mruby-time/src/time.c +++ b/mrbgems/mruby-time/src/time.c @@ -18,7 +18,7 @@ #define NDIV(x,y) (-(-((x)+1)/(y))-1) -#if _MSC_VER < 1800 +#if defined(_MSC_VER) && _MSC_VER < 1800 double round(double x) { if (x >= 0.0) { return (double)((int)(x + 0.5)); -- cgit v1.2.3