Index: ports/nacl-spawn/nacl_spawn.cc |
diff --git a/ports/nacl-spawn/nacl_spawn.cc b/ports/nacl-spawn/nacl_spawn.cc |
index f86cfb83b32ab135698a184a690316feade13445..8208755ee7e459e63df4812a0c554e69c7fda270 100644 |
--- a/ports/nacl-spawn/nacl_spawn.cc |
+++ b/ports/nacl-spawn/nacl_spawn.cc |
@@ -53,15 +53,11 @@ struct NaClSpawnReply { |
}; |
static std::string GetCwd() { |
- char cwd[PATH_MAX + 1]; |
- // TODO(hamaji): Remove this #if and always call getcwd. |
- // https://code.google.com/p/naclports/issues/detail?id=109 |
binji
2014/12/11 23:19:57
reference this bug?
|
-#if defined(__GLIBC__) |
- if (!getwd(cwd)) |
-#else |
- if (!getcwd(cwd, PATH_MAX)) |
-#endif |
+ char cwd[PATH_MAX] = "."; |
+ if (!getcwd(cwd, PATH_MAX)) { |
+ NACL_LOG("getcwd failed: %s\n", strerror(errno)); |
assert(0); |
+ } |
return cwd; |
} |