diff --git a/CHANGELOG.md b/CHANGELOG.md
index 335098bf47..01a61c8f2b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -33,6 +33,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
   ([#491](https://github.com/nix-rust/nix/pull/491))
 - Added `fchdir` in `::nix::unistd`
   ([#497](https://github.com/nix-rust/nix/pull/497))
+- Corrected the value of `O_TMPFILE`.
+  ([#501](https://github.com/nix-rust/nix/pull/501))
 
 ### Changed
 - `epoll_ctl` now could accept None as argument `event`
diff --git a/src/fcntl.rs b/src/fcntl.rs
index 1d9ba4998d..d95785e2fb 100644
--- a/src/fcntl.rs
+++ b/src/fcntl.rs
@@ -167,7 +167,7 @@ mod consts {
             const O_CLOEXEC   = 0o02000000,
             const O_SYNC      = 0o04000000,
             const O_PATH      = 0o10000000,
-            const O_TMPFILE   = 0o20000000,
+            const O_TMPFILE   = 0o20000000 | O_DIRECTORY.bits,
             const O_NDELAY    = O_NONBLOCK.bits
         }
     );