mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-16 18:56:54 +02:00
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.
This commit is contained in:
@@ -26,11 +26,16 @@
|
||||
|
||||
#if defined(unix) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__)
|
||||
#include <sys/uio.h>
|
||||
namespace msgpack {
|
||||
typedef ::iovec iovec;
|
||||
} // namespace msgpack
|
||||
#else
|
||||
namespace msgpack {
|
||||
struct iovec {
|
||||
void *iov_base;
|
||||
size_t iov_len;
|
||||
};
|
||||
} // namespace msgpack
|
||||
#endif
|
||||
|
||||
namespace msgpack {
|
||||
@@ -183,7 +188,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
const struct iovec* vector() const
|
||||
const iovec* vector() const
|
||||
{
|
||||
return m_array;
|
||||
}
|
||||
|
Reference in New Issue
Block a user