mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-27 03:54:19 +08:00
mke2fs: use the correct shared library version for libarchive on FreeBSD
Adjust for the fact that Linux uses libarchive.so.13, while freeBSD uses libarchive.so.7. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
ea562cbcd9
commit
8c012b7b57
@ -55,10 +55,16 @@ static int (*dl_archive_read_support_format_all)(struct archive *);
|
||||
|
||||
static void *libarchive_handle;
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#define LIBARCHIVE_SO "libarchive.so.7"
|
||||
#else
|
||||
#define LIBARCHIVE_SO "libarchive.so.13"
|
||||
#endif
|
||||
|
||||
static int libarchive_available(void)
|
||||
{
|
||||
if (!libarchive_handle) {
|
||||
libarchive_handle = dlopen("libarchive.so.13", RTLD_NOW);
|
||||
libarchive_handle = dlopen(LIBARCHIVE_SO, RTLD_NOW);
|
||||
if (!libarchive_handle)
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user