Open Rhialto opened 6 years ago
This has been improved in NetBSD 8.0 and HEAD so cast should be no longer needed.
And option is to use:
#if defined(__NetBSD__) /* NetBSD version < 8.0 */
#define LIBEV_UDATA(a) __CAST(intptr_t, (a))
#else
#define LIBEV_UDATA(a) (a)
#endif
and use in the code:
EV_SET(itr, event->file_descriptor(), mask, op, 0, 0, LIBEV_UDATA(event));
Gcc versions such as gcc7, and clang, complain like this when compiling on NetBSD 7:
Different compiler versions may have different exact complaints, but the ones I saw with the ones at my disposal get fixed by adding the following casts. kevent.udata is of type intptr_t (or close enough).