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:
parent
e45673dece
commit
2767972386
2
env/fs_posix.cc
vendored
2
env/fs_posix.cc
vendored
@ -122,6 +122,8 @@ int cloexec_flags(int flags, const EnvOptions* options) {
|
|||||||
if (options == nullptr || options->set_fd_cloexec) {
|
if (options == nullptr || options->set_fd_cloexec) {
|
||||||
flags |= O_CLOEXEC;
|
flags |= O_CLOEXEC;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void)options;
|
||||||
#endif
|
#endif
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user