From 1d5cccb5837f210d8156811e87cdb111c2037d80 Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Tue, 13 Nov 2018 13:08:03 -0800 Subject: bugfix: flip library search logic Fix library search logic to load libraries installed of the format: libname.so.? versus libname.so because the recipe creates a symlink of the form libname.so.? only. Tested: Now it finds and loads the handlers. Change-Id: Ie7280f41a678bf78db226bb458c02396e352da56 Signed-off-by: Patrick Venture --- utils.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'utils.cpp') diff --git a/utils.cpp b/utils.cpp index 1daa3c9..5253c1c 100644 --- a/utils.cpp +++ b/utils.cpp @@ -20,7 +20,12 @@ void loadLibraries(const std::string& path) { auto ps = p.path().string(); - if (!std::regex_match(ps, std::regex(".+\\.so$"))) + /* The bitbake recipe symlinks the library lib*.so.? into the folder + * only, and not the other names, .so, .so.?.?, .so.?.?.? + * + * Therefore only care if it's lib*.so.? + */ + if (!std::regex_match(ps, std::regex(".+\\.so\\.\\d+$"))) { continue; } -- cgit v1.2.3