aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Keen <keenerd@gmail.com>2013-12-27 00:40:11 +0100
committerSteve Markgraf <steve@steve-m.de>2013-12-27 00:41:49 +0100
commit3ab6fffbdda5dc2db6e7da2eda996f254210e553 (patch)
tree367b8100d34d328a15bb62e38e66f9dab2d4ada1
parent7855c7c8768c91fd47425136bb4c151d0abdc224 (diff)
rtl_power: MSVC 2010 doesn't have log2()
Signed-off-by: Steve Markgraf <steve@steve-m.de>
-rw-r--r--src/rtl_power.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rtl_power.c b/src/rtl_power.c
index 04152fa..68b6fed 100644
--- a/src/rtl_power.c
+++ b/src/rtl_power.c
@@ -219,6 +219,13 @@ int cic_9_tables[][10] = {
{9, -199, -362, 5303, -25505, 77489, -25505, 5303, -362, -199},
};
+#ifdef _MSC_VER
+double log2(double n)
+{
+ return log(n) / log(2.0);
+}
+#endif
+
/* FFT based on fix_fft.c by Roberts, Slaney and Bouras
http://www.jjj.de/fft/fftpage.html
16 bit ints for everything