summaryrefslogtreecommitdiff
path: root/src/wc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wc.c')
-rw-r--r--src/wc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wc.c b/src/wc.c
index 0bb1929f4..280d7ac88 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -32,6 +32,7 @@
#include "quotearg.h"
#include "readtokens0.h"
#include "safe-read.h"
+#include "xfreopen.h"
#if !defined iswspace && !HAVE_ISWSPACE
# define iswspace(wc) \
@@ -486,7 +487,7 @@ wc_file (char const *file, struct fstatus *fstatus)
{
have_read_stdin = true;
if (O_BINARY && ! isatty (STDIN_FILENO))
- freopen (NULL, "rb", stdin);
+ xfreopen (NULL, "rb", stdin);
return wc (STDIN_FILENO, file, fstatus);
}
else