diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-02-18 17:33:24 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-02-18 17:33:24 +0000 |
commit | bef83d35531f40d5d067db7ed21d4a719f615cdc (patch) | |
tree | 84276c1c4a8bccfebb30f20399a42565bb977c76 | |
parent | 26008ff9146a0ce041ae2a9c830dc58167155d3c (diff) | |
download | mandoc-bef83d35531f40d5d067db7ed21d4a719f615cdc.tar.gz mandoc-bef83d35531f40d5d067db7ed21d4a719f615cdc.tar.zst mandoc-bef83d35531f40d5d067db7ed21d4a719f615cdc.zip |
merge revision 1.161: resolve trivial differences with OpenBSD
-rw-r--r-- | read.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.150.2.7 2017/02/03 18:22:30 schwarze Exp $ */ +/* $Id: read.c,v 1.150.2.8 2017/02/18 17:33:24 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org> @@ -32,7 +32,6 @@ #include <errno.h> #include <fcntl.h> #include <stdarg.h> -#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -605,13 +604,14 @@ static int read_whole_file(struct mparse *curp, const char *file, int fd, struct buf *fb, int *with_mmap) { +#if HAVE_MMAP + struct stat st; +#endif gzFile gz; size_t off; ssize_t ssz; #if HAVE_MMAP - struct stat st; - if (fstat(fd, &st) == -1) err((int)MANDOCLEVEL_SYSERR, "%s", file); |