| Index: native_client_sdk/src/libraries/nacl_io/node.cc
|
| diff --git a/native_client_sdk/src/libraries/nacl_io/node.cc b/native_client_sdk/src/libraries/nacl_io/node.cc
|
| index b91726fb1199bbaee73fe10f7b61904a4a755f2b..ddf90d1deb525e8a43386bdb6734c76ce8e53a71 100644
|
| --- a/native_client_sdk/src/libraries/nacl_io/node.cc
|
| +++ b/native_client_sdk/src/libraries/nacl_io/node.cc
|
| @@ -189,7 +189,7 @@ int Node::GetLinks() {
|
| }
|
|
|
| int Node::GetMode() {
|
| - return stat_.st_mode & ~S_IFMT;
|
| + return stat_.st_mode & S_MODEBITS;
|
| }
|
|
|
| Error Node::GetSize(off_t* out_size) {
|
| @@ -208,8 +208,8 @@ void Node::SetType(int type) {
|
| }
|
|
|
| void Node::SetMode(int mode) {
|
| - assert((mode & S_IFMT) == 0);
|
| - stat_.st_mode &= S_IFMT;
|
| + assert((mode & ~S_MODEBITS) == 0);
|
| + stat_.st_mode &= ~S_MODEBITS;
|
| stat_.st_mode |= mode;
|
| }
|
|
|
|
|