diff options
Diffstat (limited to 'openbsd-compat/openbsd-compat.h')
-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 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 | ||
179 | int readv(int, struct iovec *, int); | ||
180 | # endif | ||
181 | |||
182 | # if defined(HAVE_DECL_WRITEV) && HAVE_DECL_WRITEV == 0 | ||
176 | int writev(int, struct iovec *, int); | 183 | int writev(int, struct iovec *, int); |
184 | # endif | ||
177 | #endif | 185 | #endif |
178 | 186 | ||
179 | /* Home grown routines */ | 187 | /* Home grown routines */ |