Bug 573958 - Extend LD_LIBRARY_PATH instead of replacing it during plugin-container initialization. r=bsmedberg

This commit is contained in:
Mike Hommey 2011-07-21 09:53:29 +02:00
parent 62f54e9b3f
commit 0ec7b9b37e

View File

@ -449,7 +449,16 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
# ifdef ANDROID
path += "/lib";
# endif // ANDROID
newEnvVars["LD_LIBRARY_PATH"] = path.get();
const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH");
nsCString new_ld_lib_path;
if (ld_library_path && *ld_library_path) {
new_ld_lib_path.Assign(ld_library_path);
new_ld_lib_path.AppendLiteral(":");
new_ld_lib_path.Append(path.get());
newEnvVars["LD_LIBRARY_PATH"] = new_ld_lib_path.get();
} else {
newEnvVars["LD_LIBRARY_PATH"] = path.get();
}
# elif OS_MACOSX
newEnvVars["DYLD_LIBRARY_PATH"] = path.get();
// XXX DYLD_INSERT_LIBRARIES should only be set when launching a plugin