From aced2dbd0e4f1fd8c8d6637e46622e640334a351 Mon Sep 17 00:00:00 2001 From: Steve Markgraf Date: Mon, 18 Nov 2013 21:36:19 +0100 Subject: [PATCH] rtl_fm/power: unbreak MinGW build Signed-off-by: Steve Markgraf --- src/rtl_fm.c | 2 ++ src/rtl_power.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/rtl_fm.c b/src/rtl_fm.c index 8851f87..5b251e5 100644 --- a/src/rtl_fm.c +++ b/src/rtl_fm.c @@ -57,7 +57,9 @@ #include #include "getopt/getopt.h" #define usleep(x) Sleep(x/1000) +#ifdef _MSC_VER #define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5)) +#endif #define _USE_MATH_DEFINES #endif diff --git a/src/rtl_power.c b/src/rtl_power.c index b63fd71..2d53c8e 100644 --- a/src/rtl_power.c +++ b/src/rtl_power.c @@ -53,7 +53,9 @@ #include #include "getopt/getopt.h" #define usleep(x) Sleep(x/1000) +#ifdef _MSC_VER #define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5)) +#endif #define _USE_MATH_DEFINES #endif