diff options
author | Josh Blum <josh@joshknows.com> | 2015-12-06 17:10:25 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2015-12-06 17:10:25 -0800 |
commit | c804460f5dbe0cc673cf95298285a3afa87fd232 (patch) | |
tree | 208d852b45a7dd15f4f5b43ce7b3751e704796de | |
parent | 9ceadfb645f2aadc7e86b87a374340a928af42da (diff) |
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).
-rw-r--r-- | lib/config.h.in | 6 |
1 files changed, 6 insertions, 0 deletions
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 <limits> +#define NAN std::numeric_limits<double>::quiet_NaN() +#endif + #endif // CONFIG_H_IN |