Fix warning when O_CLOEXEC is not defined (#6695)

Summary:
Compilation fails on systems that do not support O_CLOEXEC. Fix it.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6695

Test Plan: compile without O_CLOEXEC support

Reviewed By: anand1976

Differential Revision: D21011850

Pulled By: cheng-chang

fbshipit-source-id: f1bf1cce2aa65c7d10b5a9613e941db30e928347
This commit is contained in:
Cheng Chang 2020-04-16 11:00:00 -07:00 committed by Facebook GitHub Bot
parent e45673dece
commit 2767972386

2
env/fs_posix.cc vendored
View File

@ -122,6 +122,8 @@ int cloexec_flags(int flags, const EnvOptions* options) {
if (options == nullptr || options->set_fd_cloexec) {
flags |= O_CLOEXEC;
}
#else
(void)options;
#endif
return flags;
}