Skip to content

Commit

Permalink
Fix warning when O_CLOEXEC is not defined (#6695)
Browse files Browse the repository at this point in the history
Summary:
Compilation fails on systems that do not support O_CLOEXEC. Fix it.
Pull Request resolved: facebook/rocksdb#6695

Test Plan: compile without O_CLOEXEC support

Reviewed By: anand1976

Differential Revision: D21011850

Pulled By: cheng-chang

fbshipit-source-id: f1bf1cce2aa65c7d10b5a9613e941db30e928347
Signed-off-by: Changlong Chen <levisonchen@live.cn>
  • Loading branch information
Cheng Chang authored and mm304321141 committed Jun 23, 2021
1 parent ef0ffaa commit 5954a10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions env/fs_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5954a10

Please sign in to comment.