ray/thirdparty/patches/msgpack-windows-iovec.patch
Amit Sadaphule f0b7de7cfe
Fix '//:redis_client' build on RHEL 7.6 ppc64le (#9035)
Co-authored-by: Mehrdad <noreply@github.com>
2020-06-19 16:28:37 -07:00

27 lines
585 B
Diff

diff --git include/msgpack/v1/vrefbuffer.hpp include/msgpack/v1/vrefbuffer.hpp
--- include/msgpack/v1/vrefbuffer.hpp
+++ include/msgpack/v1/vrefbuffer.hpp
@@ -28,4 +28,19 @@
+#ifdef _WIN32
+#ifndef _WS2DEF_
+#include <Winsock2.h>
+#endif
+#ifndef iovec
+#define iovec _WSABUF
+#endif
+#ifndef iov_base
+#define iov_base buf
+#endif
+#ifndef iov_len
+#define iov_len len
+#endif
+#else
struct iovec {
void *iov_base;
size_t iov_len;
};
+#endif
@@ -171,1 +179,1 @@
- const_cast<const void *>((m_tail - 1)->iov_base)
+ (m_tail - 1)->iov_base
--