diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-02-18 17:29:28 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-02-18 17:29:28 +0000 |
commit | 3f968db8abf6c67688eb68269c1c0be0e3f0fb1b (patch) | |
tree | 9b118372b4c649d34682d51138fec7e8ee0ab917 | |
parent | 60009889a326a49cd767d575523e1e753e66414d (diff) | |
download | mandoc-3f968db8abf6c67688eb68269c1c0be0e3f0fb1b.tar.gz mandoc-3f968db8abf6c67688eb68269c1c0be0e3f0fb1b.tar.zst mandoc-3f968db8abf6c67688eb68269c1c0be0e3f0fb1b.zip |
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()
-rw-r--r-- | read.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.160 2017/02/03 18:18:23 schwarze Exp $ */ +/* $Id: read.c,v 1.161 2017/02/18 17:29:28 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org> @@ -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); |