]> Sergey Matveev's repositories - nnn.git/commitdiff
Readahead is not available on all platforms
authorArun Prakash Jana <engineerarun@gmail.com>
Mon, 18 Nov 2019 16:34:09 +0000 (22:04 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 18 Nov 2019 16:34:09 +0000 (22:04 +0530)
src/nnn.c

index 2d9be92e648c4d0bf322082c597b5f89764043ec..53d8575dd85ed30eafb9cc733db8e4259747e1b5 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3513,7 +3513,9 @@ static int dentfill(char *path, struct entry **dents)
                        open_max = max_openfds();
        }
 
+#if _POSIX_C_SOURCE >= 200112L
        posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
+#endif
 
        dp = readdir(dirp);
        if (!dp)