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

zeromq.hpp uses undefined SOCKET on Windows #2

@mschubert

Description

@mschubert

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions