From: Arun Prakash Jana Date: Mon, 18 Nov 2019 16:34:09 +0000 (+0530) Subject: Readahead is not available on all platforms X-Git-Tag: v2.8~57 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=97e16364bb52a8132254b08fc95ab5a094ec9537;p=nnn.git Readahead is not available on all platforms --- diff --git a/src/nnn.c b/src/nnn.c index 2d9be92e..53d8575d 100644 --- 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)