From 6a61b9ac105b8eb28680e728a2723e302a91304d Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 28 Aug 2019 12:19:29 +0200 Subject: [PATCH] probe: fallback to libblkid.so.1 when libblkid.so does not exist OpenWrt commit 0e70f69a35 ("treewide: revise library packaging") removed the unversioned library symlink from the libblkid package, breaking dynamic loading of the library at runtime. Add a fallback to "libblkid.so.1" to allow using the dynamic library for filesystem probing again. Fixes: FS#2274 Signed-off-by: Jo-Philipp Wich --- probe-libblkid.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/probe-libblkid.c b/probe-libblkid.c index ad9f371..870965e 100644 --- a/probe-libblkid.c +++ b/probe-libblkid.c @@ -37,6 +37,9 @@ load_libblkid(void) if (!libblkid.loaded) { lib = dlopen("libblkid.so", RTLD_GLOBAL); + if (lib == NULL) + lib = dlopen("libblkid.so.1", RTLD_GLOBAL); + if (lib) { libblkid.alloc = dlsym(lib, "blkid_new_probe_from_filename"); libblkid.probe = dlsym(lib, "blkid_do_probe"); -- 2.30.2