Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

zeromq.hpp uses undefined SOCKET on Windows #2

Open
mschubert opened this issue May 15, 2021 · 1 comment
Open

zeromq.hpp uses undefined SOCKET on Windows #2

mschubert opened this issue May 15, 2021 · 1 comment

Comments

@mschubert
Copy link

mschubert commented May 15, 2021

In zeromq.hpp#L2584-L2594, the socket file descriptor is defined with type SOCKET.

template<class T = no_user_data> struct poller_event
{
    socket_ref socket;
#ifdef _WIN32
    SOCKET fd;
#else
    int fd;
#endif
    T *user_data;
    event_flags events;
};

This is failing to compile for me with the error:

../windows/zeromq-4.3.4/include/zmq.hpp:2588:5: error: 'SOCKET' does not name a type; did you mean 'NORET'?

In the latest cppzmq/zeromq.hpp (changed Feb 12th) this is no longer the case.

template<class T = no_user_data> struct poller_event
{
    socket_ref socket;
    ::zmq::fd_t fd;
    T *user_data;
    event_flags events;
};

It seems to me that the included cppzmq version here was matching to libzmq=4.3.3, and there were changes in 4.3.4 that are not entirely compatible with cppzmq=4.7.1 (but should rather use cppzmq=4.8.0).

Would it be possible to update zeromq.hpp to the latest release?

(Not a high priority, I can work around by providing my own header)

@jeroen
Copy link
Contributor

jeroen commented May 16, 2021

Yes can you send a PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants