Skip to content

Commit 81d12ce

Browse files
committed
FileSystem: let Native Client do open() like others
It looks like the O_CLOEXEC symbol isn't missing.
1 parent 54f333c commit 81d12ce

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/common/FileSystem.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,9 @@ inline int my_open(Str::StringRef path, openMode_t mode)
194194
CloseHandle(h);
195195
#elif defined(__linux__) && defined(__GLIBC__)
196196
int fd = open64(path.c_str(), modes[mode_] | O_CLOEXEC | O_LARGEFILE, 0666);
197-
#elif defined(__native_client__)
198-
// This doesn't actually work, but it's not used anyways
199-
int fd = open(path.c_str(), modes[mode_], 0666);
200197
#else
201-
// O_CLOEXEC is supported in macOS from 10.7 onwards
198+
// This doesn't actually work in Native Client, but it's not used anyways.
199+
// O_CLOEXEC is supported in macOS from 10.7 onwards.
202200
int fd = open(path.c_str(), modes[mode_] | O_CLOEXEC, 0666);
203201
#endif
204202

0 commit comments

Comments
 (0)