mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 00:10:58 +08:00
Fix build with USE_ASAN=ON
Signed-off-by: Mateusz Tabaka <tab.debugteam@gmail.com> https://github.com/intel/compute-runtime/pull/314 Change-Id: I2b699df3f158b961a1a329fb81de8cd7115d06bc
This commit is contained in:
@@ -22,12 +22,15 @@ const char *fSeparator = "/";
|
||||
Environment *gEnvironment;
|
||||
|
||||
std::string getRunPath() {
|
||||
std::string res;
|
||||
char *cwd;
|
||||
#if defined(__linux__)
|
||||
res = getcwd(nullptr, 0);
|
||||
cwd = getcwd(nullptr, 0);
|
||||
#else
|
||||
res = _getcwd(nullptr, 0);
|
||||
cwd = _getcwd(nullptr, 0);
|
||||
#endif
|
||||
std::string res{cwd};
|
||||
free(cwd);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user