diff --git a/cliloader/printmetrics.h b/cliloader/printmetrics.h index 9ea385cb..71244a45 100644 --- a/cliloader/printmetrics.h +++ b/cliloader/printmetrics.h @@ -41,6 +41,12 @@ static void* OpenLibrary() { void* ret = dlopen(cMDLibFileName, RTLD_LAZY | RTLD_LOCAL); #if !defined(__APPLE__) + if (ret == NULL) + { + // try adding an explicit soversion + std::string check(cMDLibFileName); check += ".1"; + ret = dlopen(check.c_str(), RTLD_LAZY | RTLD_LOCAL); + } if (ret == NULL) { // old alternate name, may eventually be removed diff --git a/intercept/mdapi/MetricsDiscoveryHelper.cpp b/intercept/mdapi/MetricsDiscoveryHelper.cpp index 6c45fa95..fd35d175 100644 --- a/intercept/mdapi/MetricsDiscoveryHelper.cpp +++ b/intercept/mdapi/MetricsDiscoveryHelper.cpp @@ -61,6 +61,12 @@ static void* OpenLibrary( const std::string& metricsLibraryName ) ret = dlopen(cMDLibFileName, RTLD_LAZY | RTLD_LOCAL); } #if !defined(__APPLE__) + if (ret == NULL) + { + // try adding an explicit soversion + std::string check(cMDLibFileName); check += ".1"; + ret = dlopen(check.c_str(), RTLD_LAZY | RTLD_LOCAL); + } if( ret == NULL ) { // old alternate name, may eventually be removed