X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=updatedb.cpp;h=1465b5b54fc11fd80a11060ffad511ecc1e0cb1a;hb=9980e72ff12857b862705979d2ff84820c2fc097;hp=17067b8d0d10e705048f7d76ab2cc0081a94027e;hpb=735857b61ed48d4ca5e2d47b17009a4b5e3f1f07;p=plocate 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) {