diff options
author | 2003-01-19 23:35:02 +0000 | |
---|---|---|
committer | 2003-01-19 23:35:02 +0000 | |
commit | 4aef5dd89d60b93ab1221ef9f32f22a2060c7d56 (patch) | |
tree | aa26b13cf5b888475add9b3c389df84309c42151 | |
parent | revamp .init call code to be saner: (diff) | |
download | wireguard-openbsd-4aef5dd89d60b93ab1221ef9f32f22a2060c7d56.tar.xz wireguard-openbsd-4aef5dd89d60b93ab1221ef9f32f22a2060c7d56.zip |
give a second chance for loading dependent modules:
look in the path of the main map before giving up.
ok deraadt@.
(This fixes a few kde issues, and removes loads of needs for ldconfig)
-rw-r--r-- | gnu/usr.bin/ld/rtld/rtld.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c index f142296d8a9..bc7a9f64630 100644 --- a/gnu/usr.bin/ld/rtld/rtld.c +++ b/gnu/usr.bin/ld/rtld/rtld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld.c,v 1.35 2003/01/19 23:33:40 espie Exp $ */ +/* $OpenBSD: rtld.c,v 1.36 2003/01/19 23:35:02 espie Exp $ */ /* $NetBSD: rtld.c,v 1.43 1996/01/14 00:35:17 pk Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -623,6 +623,16 @@ again: if (ipath) remove_search_path(ipath); + if (path == NULL && smp != main_map && main_map != NULL && + !no_intern_search && + LD_PATHS(main_map->som_dynamic) != 0) { + ipath = LM_PATHS(main_map); + add_search_path(ipath); + path = rtfindlib(name, sodp->sod_major, + sodp->sod_minor, &usehints, ipath); + remove_search_path(ipath); + } + if (path == NULL) { errno = ENOENT; return NULL; |