summaryrefslogtreecommitdiff
path: root/snappy-stubs-public.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'snappy-stubs-public.h.in')
-rw-r--r--snappy-stubs-public.h.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/snappy-stubs-public.h.in b/snappy-stubs-public.h.in
index f0babcb..6c181a1 100644
--- a/snappy-stubs-public.h.in
+++ b/snappy-stubs-public.h.in
@@ -44,6 +44,10 @@
#include <stddef.h>
#endif
+#if @ac_cv_have_sys_uio_h@
+#include <sys/uio.h>
+#endif
+
#define SNAPPY_MAJOR @SNAPPY_MAJOR@
#define SNAPPY_MINOR @SNAPPY_MINOR@
#define SNAPPY_PATCHLEVEL @SNAPPY_PATCHLEVEL@
@@ -80,6 +84,15 @@ typedef std::string string;
TypeName(const TypeName&); \
void operator=(const TypeName&)
+#if !@ac_cv_have_sys_uio_h@
+// Windows does not have an iovec type, yet the concept is universally useful.
+// It is simple to define it ourselves, so we put it inside our own namespace.
+struct iovec {
+ void* iov_base;
+ size_t iov_len;
+};
+#endif
+
} // namespace snappy
#endif // UTIL_SNAPPY_OPENSOURCE_SNAPPY_STUBS_PUBLIC_H_