From 02eedafcb393ef771ab6231d6583c58d12b97837 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sat, 20 Feb 2010 22:57:40 -0800 Subject: Add portable/uio.h and include it in client/wallet.c Now that the wallet client uses struct iovec, it needs to include the relevant header file. Import the portability layer for possible future Windows support. --- portable/uio.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 portable/uio.h (limited to 'portable/uio.h') diff --git a/portable/uio.h b/portable/uio.h new file mode 100644 index 0000000..3c9e840 --- /dev/null +++ b/portable/uio.h @@ -0,0 +1,27 @@ +/* + * Portability wrapper around . + * + * Provides a definition of the iovec struct for platforms that don't have it + * (primarily Windows). Currently, the corresponding readv and writev + * functions are not provided or prototyped here. + * + * Written by Russ Allbery + * This work is hereby placed in the public domain by its author. + */ + +#ifndef PORTABLE_UIO_H +#define PORTABLE_UIO_H 1 + +#include + +/* remctl.h provides its own definition of this struct on Windows. */ +#if defined(HAVE_SYS_UIO_H) +# include +#elif !defined(REMCTL_H) +struct iovec { + void *iov_base; + size_t iov_len; +}; +#endif + +#endif /* !PORTABLE_UIO_H */ -- cgit v1.2.3