瀏覽代碼

rtl_fm/power: unbreak MinGW build

Signed-off-by: Steve Markgraf <steve@steve-m.de>
Steve Markgraf 11 年之前
父節點
當前提交
aced2dbd0e
共有 2 個文件被更改,包括 4 次插入0 次删除
  1. 2 0
      src/rtl_fm.c
  2. 2 0
      src/rtl_power.c

+ 2 - 0
src/rtl_fm.c

@@ -57,7 +57,9 @@
 #include <io.h>
 #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
 

+ 2 - 0
src/rtl_power.c

@@ -53,7 +53,9 @@
 #include <io.h>
 #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