We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 715e620 commit 724948bCopy full SHA for 724948b
src/mongoc/mongoc-iovec.h
@@ -21,11 +21,12 @@
21
22
#include <bson.h>
23
24
-#ifndef _WIN32
+#ifdef _WIN32
25
+# include <stddef.h>
26
+#else
27
# include <sys/uio.h>
28
#endif
29
-
30
BSON_BEGIN_DECLS
31
32
@@ -35,6 +36,11 @@ typedef struct
35
36
u_long iov_len;
37
char *iov_base;
38
} mongoc_iovec_t;
39
+
40
+BSON_STATIC_ASSERT(sizeof(mongoc_iovec_t) == sizeof(WSABUF));
41
+BSON_STATIC_ASSERT(offsetof(mongoc_iovec_t, iov_base) == offsetof(WSABUF, buf));
42
+BSON_STATIC_ASSERT(offsetof(mongoc_iovec_t, iov_len) == offsetof(WSABUF, len));
43
44
#else
45
typedef struct iovec mongoc_iovec_t;
46
0 commit comments