mirror of
https://github.com/zeromq/cppzmq.git
synced 2024-12-12 10:33:52 +01:00
fix build error with libzmq-3.2.5 (#103)
error zmq_send_const undefined and zmq_msg_gets undefined
This commit is contained in:
parent
229e7a849b
commit
3431f6882a
6
zmq.hpp
6
zmq.hpp
@ -372,6 +372,7 @@ namespace zmq
|
||||
return a == b;
|
||||
}
|
||||
|
||||
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 0, 8)
|
||||
inline const char* gets(const char *property_)
|
||||
{
|
||||
const char* value = zmq_msg_gets (&msg, property_);
|
||||
@ -379,6 +380,7 @@ namespace zmq
|
||||
throw error_t ();
|
||||
return value;
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
// The underlying message
|
||||
@ -622,7 +624,11 @@ namespace zmq
|
||||
|
||||
inline size_t send (const void *buf_, size_t len_, int flags_ = 0)
|
||||
{
|
||||
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 0, 8)
|
||||
int nbytes = zmq_send_const (ptr, buf_, len_, flags_);
|
||||
#else
|
||||
int nbytes = zmq_send (ptr, buf_, len_, flags_);
|
||||
#endif
|
||||
if (nbytes >= 0)
|
||||
return (size_t) nbytes;
|
||||
if (zmq_errno () == EAGAIN)
|
||||
|
Loading…
Reference in New Issue
Block a user