Fix '//:redis_client' build on RHEL 7.6 ppc64le (#9035)

Co-authored-by: Mehrdad <noreply@github.com>
This commit is contained in:
Amit Sadaphule
2020-06-20 04:58:37 +05:30
committed by GitHub
parent 2589309cf0
commit f0b7de7cfe
+8 -5
View File
@@ -1,11 +1,8 @@
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,12 @@
-struct iovec {
- void *iov_base;
- size_t iov_len;
-};
@@ -28,4 +28,19 @@
+#ifdef _WIN32
+#ifndef _WS2DEF_
+#include <Winsock2.h>
+#endif
@@ -18,6 +15,12 @@ diff --git include/msgpack/v1/vrefbuffer.hpp include/msgpack/v1/vrefbuffer.hpp
+#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