--- configure.ac | 5 +++++ plugins/vddk/vddk.c | 4 ++++ 2 files changed, 9 insertions(+)
diff --git a/configure.ac b/configure.ac index d71f06e4..57626a76 100644 --- a/configure.ac +++ b/configure.ac @@ -321,6 +321,11 @@ AC_SEARCH_LIBS([dlsym], [dl dld], [ ]) LIBS="$old_LIBS" +old_LIBS="$LIBS" +LIBS="$LIBS -ldl" +AC_CHECK_FUNCS([dlmopen]) +LIBS="$old_LIBS" + dnl Test if <iconv.h> header can build working binaries. dnl dnl On FreeBSD: iconv and libiconv both exist, both can be installed diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c index 487ebba6..30dd6375 100644 --- a/plugins/vddk/vddk.c +++ b/plugins/vddk/vddk.c @@ -267,7 +267,11 @@ load_library (void) exit (EXIT_FAILURE); } +#ifdef HAVE_DLMOPEN + dl = dlmopen (LM_ID_NEWLM, path, RTLD_NOW); +#else dl = dlopen (path, RTLD_NOW); +#endif if (dl != NULL) break; if (i == 0) { -- 2.25.0 _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs