From: Steinar H. Gunderson Date: Sat, 12 Dec 2020 11:54:31 +0000 (+0100) Subject: Compile on platforms without O_NOATIME. X-Git-Tag: 1.1.3~2 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=9980e72ff12857b862705979d2ff84820c2fc097;p=plocate Compile on platforms without O_NOATIME. --- diff --git a/updatedb.cpp b/updatedb.cpp index 17067b8..1465b5b 100644 --- a/updatedb.cpp +++ b/updatedb.cpp @@ -92,7 +92,11 @@ int opendir_noatime(int dirfd, const char *path) static bool noatime_failed = false; if (!noatime_failed) { +#ifdef O_NOATIME int fd = openat(dirfd, path, O_RDONLY | O_DIRECTORY | O_NOATIME); +#else + int fd = openat(dirfd, path, O_RDONLY | O_DIRECTORY); +#endif if (fd != -1) { return fd; } else if (errno == EPERM) {