Skip to content

Commit

Permalink
Fix compilation problems with newer soapysdr.
Browse files Browse the repository at this point in the history
Newer API versions overload SoapySDR::Device::unmake, and the compiler
doesn't manage to infer the right overload to use, so explicitly select
the one we want.
  • Loading branch information
mutability committed Jun 23, 2019
1 parent a010bc4 commit 0541c7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion soapy_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ SoapySampleSource::~SoapySampleSource() { Stop(); }

void SoapySampleSource::Init() {
try {
device_ = {SoapySDR::Device::make(device_name_), &SoapySDR::Device::unmake};
void (*unmake)(SoapySDR::Device *) = &SoapySDR::Device::unmake; // select the right overload
device_ = {SoapySDR::Device::make(device_name_), unmake};
} catch (const std::runtime_error &err) {
throw config_error(std::string("No matching SoapySDR device found (cause: ") + err.what() + ")");
}
Expand Down

0 comments on commit 0541c7b

Please sign in to comment.