summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2018-02-24 21:06:48 +1100
committerDarren Tucker <dtucker@dtucker.net>2018-02-26 00:09:04 +1100
commit2eb4041493fd2635ffdc64a852d02b38c4955e0b (patch)
treea5f41e6d849ade478c674d463a3bd6774a74a543 /openbsd-compat
parent6c8c9a615b6d31db8a87bc25033f053d5b0a831e (diff)
Add prototype for readv if needed.
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/openbsd-compat.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index 8155a0dd7..b48fb9342 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -170,10 +170,18 @@ int BSDgetopt(int argc, char * const *argv, const char *opts);
170#include "openbsd-compat/getopt.h" 170#include "openbsd-compat/getopt.h"
171#endif 171#endif
172 172
173#if defined(HAVE_DECL_WRITEV) && HAVE_DECL_WRITEV == 0 173#if ((defined(HAVE_DECL_READV) && HAVE_DECL_READV == 0) || \
174 (defined(HAVE_DECL_WRITEV) && HAVE_DECL_WRITEV == 0))
174# include <sys/types.h> 175# include <sys/types.h>
175# include <sys/uio.h> 176# include <sys/uio.h>
177
178# if defined(HAVE_DECL_READV) && HAVE_DECL_READV == 0
179int readv(int, struct iovec *, int);
180# endif
181
182# if defined(HAVE_DECL_WRITEV) && HAVE_DECL_WRITEV == 0
176int writev(int, struct iovec *, int); 183int writev(int, struct iovec *, int);
184# endif
177#endif 185#endif
178 186
179/* Home grown routines */ 187/* Home grown routines */