do not use default when dynamic linker fails to open existing path file
[musl] / src / ldso / dynlink.c
index 6d3d08e..a89e743 100644 (file)
@@ -614,6 +614,8 @@ static struct dso *load_library(const char *name, struct dso *needed_by)
                                                sys_path = "";
                                        }
                                        fclose(f);
+                               } else if (errno != ENOENT) {
+                                       sys_path = "";
                                }
                        }
                        if (!sys_path) sys_path = "/lib:/usr/local/lib:/usr/lib";