summaryrefslogtreecommitdiff
path: root/src/wc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wc.c')
-rw-r--r--src/wc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wc.c b/src/wc.c
index 53d83876d..ef76b7eb0 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -217,6 +217,7 @@ wc (fd, file)
if (print_chars && !print_words && !print_lines)
{
off_t current_pos, end_pos;
+ struct stat stats;
if (fstat (fd, &stats) == 0 && S_ISREG (stats.st_mode)
&& (current_pos = lseek (fd, (off_t) 0, SEEK_CUR)) != -1