From: Jo-Philipp Wich Date: Wed, 28 Aug 2019 10:19:29 +0000 (+0200) Subject: probe: fallback to libblkid.so.1 when libblkid.so does not exist X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6a61b9ac105b8eb28680e728a2723e302a91304d;p=oweals%2Ffstools.git 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 --- 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");