From c804460f5dbe0cc673cf95298285a3afa87fd232 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 6 Dec 2015 17:10:25 -0800 Subject: [PATCH] provide NAN define for MSVC older than VC12 This fixes a minor compile issue on VC11 and below where source_impl.cc and sink_impl.cc use the float NAN define. The patch simply defines the NAN macro conditionally, in a common header (which seemed like the best place). --- lib/config.h.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/config.h.in b/lib/config.h.in index 66c3e1b..542b364 100644 --- a/lib/config.h.in +++ b/lib/config.h.in @@ -18,4 +18,10 @@ #cmakedefine ENABLE_AIRSPY #cmakedefine ENABLE_SOAPY +//provide NAN define for MSVC older than VC12 +#if defined(_MSC_VER) && (_MSC_VER < 1800) +#include +#define NAN std::numeric_limits::quiet_NaN() +#endif + #endif // CONFIG_H_IN