diff --git a/include/nudb/impl/posix_file.ipp b/include/nudb/impl/posix_file.ipp index cb33b82..b840a84 100644 --- a/include/nudb/impl/posix_file.ipp +++ b/include/nudb/impl/posix_file.ipp @@ -240,6 +240,13 @@ flags(file_mode mode) #endif break; } + +#ifdef O_NOATIME + // Avoid updating the file's "last access time" with every + // read, if that's an option. + result.first |= O_NOATIME; +#endif + return result; }