Ken Thomases : dbghelp: Provide a default value for DYLD_FALLBACK_LIBRARY_PATH, which is closer to how dyld behaves.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Sep 18 14:31:17 CDT 2015


Module: wine
Branch: master
Commit: d5739561d8b45fa5cc72e05b7786e581b80be668
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d5739561d8b45fa5cc72e05b7786e581b80be668

Author: Ken Thomases <ken at codeweavers.com>
Date:   Thu Sep 17 21:26:38 2015 -0500

dbghelp: Provide a default value for DYLD_FALLBACK_LIBRARY_PATH, which is closer to how dyld behaves.

---

 dlls/dbghelp/macho_module.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c
index 1352870..1f5d446 100644
--- a/dlls/dbghelp/macho_module.c
+++ b/dlls/dbghelp/macho_module.c
@@ -1571,8 +1571,10 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam
     /* Try DYLD_FALLBACK_LIBRARY_PATH, with just the filename (no directories). */
     if (!ret)
     {
-        ret = macho_load_file_from_path(pcs, p, load_addr,
-                                      getenv("DYLD_FALLBACK_LIBRARY_PATH"), macho_info);
+        const char* fallback = getenv("DYLD_FALLBACK_LIBRARY_PATH");
+        if (!fallback)
+            fallback = "/usr/local/lib:/lib:/usr/lib";
+        ret = macho_load_file_from_path(pcs, p, load_addr, fallback, macho_info);
     }
     if (!ret && !strchrW(filename, '/'))
         ret = macho_load_file_from_dll_path(pcs, filename, load_addr, macho_info);




More information about the wine-cvs mailing list