From 244c8753b4ae0ea439bcd4d8c756901a660c094d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 9 Apr 1998 17:39:34 +0000 Subject: [PATCH] (_dl_map_object): Use LD_LIBRARY_PATH envvar if global variable _dl_library_path is not set. --- elf/dl-load.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elf/dl-load.c b/elf/dl-load.c index 4773ab05f63..012613579f9 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -597,6 +597,10 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded, NULL }; + /* For static binaries _dl_library_path might be uninitialized. */ + if (_dl_library_path == NULL) + _dl_library_path = getenv ("LD_LIBRARY_PATH"); + trypath (_dl_library_path, trusted_dirs); } if (fd == -1) -- 2.47.2