summaryrefslogtreecommitdiffstats
path: root/read.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-02-18 17:29:28 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-02-18 17:29:28 +0000
commit70876fec20f1cdb90e580647f0f5eda08e3ae3f1 (patch)
tree35c7b033aa846dbab776b7ad1a47121750cae54a /read.c
parente1f927b6ebee2fc440a7aa4e80a85a295067da2d (diff)
downloadmandoc-70876fec20f1cdb90e580647f0f5eda08e3ae3f1.tar.gz
resolve trivial differences with OpenBSD:
* we include <sys/types.h> for size_t, so we don't need <stdint.h> * sort declarations in read_whole_file()
Diffstat (limited to 'read.c')
-rw-r--r--read.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/read.c b/read.c
index 7d60d51c..043eee79 100644
--- a/read.c
+++ b/read.c
@@ -30,7 +30,6 @@
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
-#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -603,12 +602,11 @@ static int
read_whole_file(struct mparse *curp, const char *file, int fd,
struct buf *fb, int *with_mmap)
{
+ struct stat st;
gzFile gz;
size_t off;
ssize_t ssz;
- struct stat st;
-
if (fstat(fd, &st) == -1)
err((int)MANDOCLEVEL_SYSERR, "%s", file);