summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-12-15 19:22:45 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-12-15 19:22:45 +0000
commit04325d540c74f28078707378a15fd3643cc9a049 (patch)
treebf1cab9e30528d74c4e52a846800e3a59115fda8
parent2c23f1ec6d3d9d7554e7993e02e795fd23c5ac46 (diff)
grep: Add missing unistd.h and limits.h includes
Both binary.c and file.c currently pull in unistd.h via zlib's zconf.h. binary.c uses SEEK_SET and file.c a bunch of things like close(), isatty(), lseek(). In addition file.c needs limits.h for PATH_MAX. ok deraadt
-rw-r--r--usr.bin/grep/binary.c3
-rw-r--r--usr.bin/grep/file.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/grep/binary.c b/usr.bin/grep/binary.c
index 119c9466aed..c1377b85854 100644
--- a/usr.bin/grep/binary.c
+++ b/usr.bin/grep/binary.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: binary.c,v 1.19 2021/03/10 21:55:22 millert Exp $ */
+/* $OpenBSD: binary.c,v 1.20 2021/12/15 19:22:44 tb Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -30,6 +30,7 @@
#include <err.h>
#include <stdio.h>
#include <string.h>
+#include <unistd.h>
#include <zlib.h>
#include "grep.h"
diff --git a/usr.bin/grep/file.c b/usr.bin/grep/file.c
index 27b7f765abf..ede1c0840c6 100644
--- a/usr.bin/grep/file.c
+++ b/usr.bin/grep/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.16 2021/03/10 21:55:22 millert Exp $ */
+/* $OpenBSD: file.c,v 1.17 2021/12/15 19:22:44 tb Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -30,8 +30,10 @@
#include <err.h>
#include <errno.h>
#include <fcntl.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <zlib.h>
#include "grep.h"