vlib: fix use of RTLD_DEEPBIND for musl 59/40759/5
authorEric Sun <[email protected]>
Wed, 2 Feb 2022 18:53:34 +0000 (10:53 -0800)
committerDamjan Marion <[email protected]>
Mon, 6 May 2024 11:55:39 +0000 (11:55 +0000)
RTLD_DEEPBIND only exists in glibc. If it isn't defined we can just
ignore it.

Type: fix
Change-Id: I5b2d65b2462020808635b057d5f7665fb75a2444
Signed-off-by: Pierre Pfister <[email protected]>
Signed-off-by: Eric Sun <[email protected]>
src/vlib/unix/plugin.c

index fd3a050..5cac9ab 100644 (file)
@@ -306,8 +306,12 @@ process_reg:
     }
   vec_free (version_required);
 
+#if defined(RTLD_DEEPBIND)
   handle = dlopen ((char *) pi->filename,
                   RTLD_LAZY | (reg->deep_bind ? RTLD_DEEPBIND : 0));
+#else
+  handle = dlopen ((char *) pi->filename, RTLD_LAZY);
+#endif
 
   if (handle == 0)
     {