forked from OSchip/llvm-project
Try to fix build on non-Windows platforms.
llvm-svn: 294213
This commit is contained in:
parent
c138da3479
commit
0fceb359ad
|
@ -795,14 +795,14 @@ Error Host::LaunchProcessPosixSpawn(const char *exe_path,
|
||||||
#else
|
#else
|
||||||
if (::getcwd(current_dir, sizeof(current_dir)) == NULL) {
|
if (::getcwd(current_dir, sizeof(current_dir)) == NULL) {
|
||||||
error.SetError(errno, eErrorTypePOSIX);
|
error.SetError(errno, eErrorTypePOSIX);
|
||||||
error.LogIfError(log, "unable to save the current directory");
|
LLDB_LOG(log, "error: {0}, unable to save the current directory", error);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (::chdir(working_dir.GetCString()) == -1) {
|
if (::chdir(working_dir.GetCString()) == -1) {
|
||||||
error.SetError(errno, eErrorTypePOSIX);
|
error.SetError(errno, eErrorTypePOSIX);
|
||||||
error.LogIfError(log, "unable to change working directory to %s",
|
LLDB_LOG(log, "error: {0}, unable to change working directory to {1}",
|
||||||
working_dir.GetCString());
|
error, working_dir);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -876,8 +876,9 @@ Error Host::LaunchProcessPosixSpawn(const char *exe_path,
|
||||||
#else
|
#else
|
||||||
if (::chdir(current_dir) == -1 && error.Success()) {
|
if (::chdir(current_dir) == -1 && error.Success()) {
|
||||||
error.SetError(errno, eErrorTypePOSIX);
|
error.SetError(errno, eErrorTypePOSIX);
|
||||||
error.LogIfError(log, "unable to change current directory back to %s",
|
LLDB_LOG(log,
|
||||||
current_dir);
|
"error: {0}, unable to change current directory back to {1}",
|
||||||
|
error, current_dir);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue