diff options
author | Davide Gerhard <rainbow@irh.it> | 2019-11-05 18:46:46 +0100 |
---|---|---|
committer | Michael Dickens <michael.dickens@ettus.com> | 2019-11-05 14:54:19 -0500 |
commit | 19cac6cb29e664cbeac731964588732b61c8573b (patch) | |
tree | b03d1319149ce6c3753dde1ec1ae5e02a9e2c1e6 /gr-vocoder/include | |
parent | 218d2c2029a8c4557906bbe55a56292f568f0910 (diff) |
codec2: fix support for codec2 version < 0.8
codec2 version < 0.8 doesn't provide codec2/version.h header
therefore cmake discovers if it is available.
fix gr-vocoder build on ubuntu < 19.04 and debian < 10
Closes: https://github.com/gnuradio/gnuradio/pull/2858#issuecomment-549391165
Diffstat (limited to 'gr-vocoder/include')
-rw-r--r-- | gr-vocoder/include/gnuradio/vocoder/freedv_api.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gr-vocoder/include/gnuradio/vocoder/freedv_api.h b/gr-vocoder/include/gnuradio/vocoder/freedv_api.h index 04c768bcb7..c025432c5d 100644 --- a/gr-vocoder/include/gnuradio/vocoder/freedv_api.h +++ b/gr-vocoder/include/gnuradio/vocoder/freedv_api.h @@ -27,14 +27,13 @@ // version >=0.9.1 contains fixes that doesn't require "extern C" // between 0.8.1 and 0.9.1 the build fail -#include <codec2/version.h> -#if CODEC2_VERSION_MAJOR == 0 && CODEC2_VERSION_MINOR < 9 +#ifdef CODEC2_LEGACY extern "C" { #endif #include <codec2/codec2.h> #include <codec2/freedv_api.h> #include <codec2/modem_stats.h> -#if CODEC2_VERSION_MAJOR == 0 && CODEC2_VERSION_MINOR < 9 +#ifdef CODEC2_LEGACY } #endif |