| Index: native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc
|
| diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc b/native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc
|
| index 4d1e1b65ce5205fd071da0d61f5ccd032c67ed5f..394cea6f89e9c3c88a9b5d860737c455e81d029b 100644
|
| --- a/native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc
|
| +++ b/native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc
|
| @@ -149,22 +149,7 @@ void ki_exit(int status) {
|
| }
|
|
|
| char* ki_getcwd(char* buf, size_t size) {
|
| - // gtest uses getcwd in a static initializer and expects it to always
|
| - // succeed. If we haven't initialized kernel-intercept yet, then try
|
| - // the IRT's getcwd, and fall back to just returning ".".
|
| - if (!ki_is_initialized()) {
|
| - int rtn = _real_getcwd(buf, size);
|
| - if (rtn != 0) {
|
| - if (rtn == ENOSYS) {
|
| - buf[0] = '.';
|
| - buf[1] = 0;
|
| - } else {
|
| - errno = rtn;
|
| - return NULL;
|
| - }
|
| - }
|
| - return buf;
|
| - }
|
| + ON_NOSYS_RETURN(NULL);
|
| return s_state.kp->getcwd(buf, size);
|
| }
|
|
|
|
|