aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_drv_nif.h
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2017-09-06 12:38:05 +0200
committerJohn Högberg <[email protected]>2017-09-06 12:38:05 +0200
commitad5d9eef3f41274f08008cdbb43afb2088d3276e (patch)
tree9d3263d517f6e3c20a5f2f855673f20efc302c9f /erts/emulator/beam/erl_drv_nif.h
parent7394b41b9f254c7f83d508cfc615bd1d63a84507 (diff)
parenteed25a02ba2416c48587699542aaecdd09609718 (diff)
downloadotp-ad5d9eef3f41274f08008cdbb43afb2088d3276e.tar.gz
otp-ad5d9eef3f41274f08008cdbb43afb2088d3276e.tar.bz2
otp-ad5d9eef3f41274f08008cdbb43afb2088d3276e.zip
Merge branch 'lukas/erts/nif_vector_q/OTP-14598' into maint
OTP-14520
Diffstat (limited to 'erts/emulator/beam/erl_drv_nif.h')
-rw-r--r--erts/emulator/beam/erl_drv_nif.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_drv_nif.h b/erts/emulator/beam/erl_drv_nif.h
index f88138063e..31b4817fb1 100644
--- a/erts/emulator/beam/erl_drv_nif.h
+++ b/erts/emulator/beam/erl_drv_nif.h
@@ -144,8 +144,25 @@ typedef signed int ErlNapiSInt;
#define ERTS_NAPI_USEC__ 2
#define ERTS_NAPI_NSEC__ 3
-#endif /* __ERL_DRV_NIF_H__ */
-
-
-
+#if (defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_))
+/*
+ * This structure can be cast to a WSABUF structure.
+ */
+typedef struct _SysIOVec {
+ unsigned long iov_len;
+ char* iov_base;
+} SysIOVec;
+#else /* Unix */
+# include <sys/types.h>
+# ifdef HAVE_SYS_UIO_H
+# include <sys/uio.h>
+typedef struct iovec SysIOVec;
+# else
+typedef struct {
+ char* iov_base;
+ size_t iov_len;
+} SysIOVec;
+# endif
+#endif
+#endif /* __ERL_DRV_NIF_H__ */