[openssh-commits] [openssh] 03/07: Add prototype for readv if needed.
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Feb 26 00:15:45 AEDT 2018
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 2eb4041493fd2635ffdc64a852d02b38c4955e0b
Author: Darren Tucker <dtucker at dtucker.net>
Date: Sat Feb 24 21:06:48 2018 +1100
Add prototype for readv if needed.
---
configure.ac | 2 +-
openbsd-compat/openbsd-compat.h | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7342dcb7..03cc3f86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1908,7 +1908,7 @@ AC_CHECK_DECLS([O_NONBLOCK], , ,
#endif
])
-AC_CHECK_DECLS([writev], , , [
+AC_CHECK_DECLS([readv, writev], , , [
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
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 */
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list