diff options
author | Darren Tucker <dtucker@dtucker.net> | 2018-02-24 21:06:48 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-02-26 00:09:04 +1100 |
commit | 2eb4041493fd2635ffdc64a852d02b38c4955e0b (patch) | |
tree | a5f41e6d849ade478c674d463a3bd6774a74a543 /openbsd-compat | |
parent | 6c8c9a615b6d31db8a87bc25033f053d5b0a831e (diff) |
Add prototype for readv if needed.
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/openbsd-compat.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index 8155a0dd..b48fb934 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); #include "openbsd-compat/getopt.h" #endif -#if defined(HAVE_DECL_WRITEV) && HAVE_DECL_WRITEV == 0 +#if ((defined(HAVE_DECL_READV) && HAVE_DECL_READV == 0) || \ + (defined(HAVE_DECL_WRITEV) && HAVE_DECL_WRITEV == 0)) # include <sys/types.h> # include <sys/uio.h> + +# if defined(HAVE_DECL_READV) && HAVE_DECL_READV == 0 +int readv(int, struct iovec *, int); +# endif + +# if defined(HAVE_DECL_WRITEV) && HAVE_DECL_WRITEV == 0 int writev(int, struct iovec *, int); +# endif #endif /* Home grown routines */ |