Skip to content

Commit 3944993

Browse files
committed
Fix name conflicts
Previously `struct iovec` was explicitly defined on non-Unix systems, which caused name conflicts when other libraries (e.g. Cyrus SASL) did the same. Using `struct iovec` as `msgpack::iovec` solves the problem.
1 parent 6b6a05e commit 3944993

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include/msgpack/v1/vrefbuffer.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@
2626

2727
#if defined(unix) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__)
2828
#include <sys/uio.h>
29+
namespace msgpack {
30+
typedef ::iovec iovec;
31+
} // namespace msgpack
2932
#else
33+
namespace msgpack {
3034
struct iovec {
3135
void *iov_base;
3236
size_t iov_len;
3337
};
38+
} // namespace msgpack
3439
#endif
3540

3641
namespace msgpack {
@@ -183,7 +188,7 @@ class vrefbuffer {
183188
}
184189
}
185190

186-
const struct iovec* vector() const
191+
const iovec* vector() const
187192
{
188193
return m_array;
189194
}

0 commit comments

Comments
 (0)