Selaa lähdekoodia

tools: minor win fix

Hoernchen 11 vuotta sitten
vanhempi
commit
7614a4d684
2 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 2 1
      src/rtl_fm.c
  2. 2 1
      src/rtl_power.c

+ 2 - 1
src/rtl_fm.c

@@ -48,7 +48,6 @@
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <math.h>
 
 #ifndef _WIN32
 #include <unistd.h>
@@ -59,8 +58,10 @@
 #include "getopt/getopt.h"
 #define usleep(x) Sleep(x/1000)
 #define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5))
+#define _USE_MATH_DEFINES
 #endif
 
+#include <math.h>
 #include <pthread.h>
 #include <libusb.h>
 

+ 2 - 1
src/rtl_power.c

@@ -44,7 +44,6 @@
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <math.h>
 #include <time.h>
 
 #ifndef _WIN32
@@ -56,8 +55,10 @@
 #include "getopt/getopt.h"
 #define usleep(x) Sleep(x/1000)
 #define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5))
+#define _USE_MATH_DEFINES
 #endif
 
+#include <math.h>
 #include <pthread.h>
 #include <libusb.h>