diff options
-rw-r--r-- | host/include/uhd/usrp/usrp.h | 2 | ||||
-rw-r--r-- | host/include/uhd/version.hpp.in | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/host/include/uhd/usrp/usrp.h b/host/include/uhd/usrp/usrp.h index f24d12b85..bb186a278 100644 --- a/host/include/uhd/usrp/usrp.h +++ b/host/include/uhd/usrp/usrp.h @@ -30,6 +30,8 @@ #include <uhd/usrp/mboard_eeprom.h> #include <uhd/usrp/dboard_eeprom.h> #include <uhd/usrp/subdev_spec.h> +/* version.hpp is safe to include in C: */ +#include <uhd/version.hpp> /* Provides UHD_VERSION */ #include <stdbool.h> #include <stdlib.h> diff --git a/host/include/uhd/version.hpp.in b/host/include/uhd/version.hpp.in index 10f6a97ba..8cfc7b8c6 100644 --- a/host/include/uhd/version.hpp.in +++ b/host/include/uhd/version.hpp.in @@ -18,9 +18,6 @@ #ifndef INCLUDED_UHD_VERSION_HPP #define INCLUDED_UHD_VERSION_HPP -#include <uhd/config.hpp> -#include <string> - /*! * The ABI version string that the client application builds against. * Call get_abi_string() to check this against the library build. @@ -36,6 +33,10 @@ */ #define UHD_VERSION @UHD_VERSION_ADDED@ +#ifdef __cplusplus +#include <uhd/config.hpp> +#include <string> + namespace uhd{ //! Get the version string (dotted version number + build info) @@ -45,5 +46,6 @@ namespace uhd{ UHD_API std::string get_abi_string(void); } //namespace uhd +#endif #endif /* INCLUDED_UHD_VERSION_HPP */ |