aboutsummaryrefslogtreecommitdiffstats
path: root/src/uniq.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uniq.c')
-rw-r--r--src/uniq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/uniq.c b/src/uniq.c
index df59b1234..86ca8c957 100644
--- a/src/uniq.c
+++ b/src/uniq.c
@@ -25,6 +25,7 @@
#include "argmatch.h"
#include "linebuffer.h"
#include "error.h"
+#include "fadvise.h"
#include "hard-locale.h"
#include "posixver.h"
#include "quote.h"
@@ -286,6 +287,8 @@ check_file (const char *infile, const char *outfile, char delimiter)
if (! (STREQ (outfile, "-") || freopen (outfile, "w", stdout)))
error (EXIT_FAILURE, errno, "%s", outfile);
+ fadvise (stdin, FADVISE_SEQUENTIAL);
+
thisline = &lb1;
prevline = &lb2;