[ASIO] Compilation error on NetBSD

Hello everybody, this is my first post to this list. Recently I got an error when compiling a program which uses ASIO on NetBSD. It is related to kqueue. From what I see it is caused by passing descriptor_state* to EV_SET. Under NetBSD it should be intptr_t. Moreover, the udata field of kevent is implicitly cast to void* later on, which also causes an error. Explicit casts solve the issue. Maybe it's worth adding? Could someone with commit access check it and eventually correct it, please? I don't know how it is under FreeBSD, maybe an ifdef is needed to support both. The relevant compilation error (boost-1.44.0, NetBSD 5.1, i386, gcc 4.3.1) In member function 'void boost::asio::detail::kqueue_reactor::start_op(int, boost::asio::detail::socket_type, boost::asio::detail::kqueue_reactor::descriptor_state*&, boost::asio::detail::reactor_op*, bool)': asio/detail/impl/kqueue_reactor.ipp:132: error: invalid conversion from 'boost::asio::detail::kqueue_reactor::descriptor_state*' to '__intptr_t' asio/detail/impl/kqueue_reactor.ipp:136: error: invalid conversion from 'boost::asio::detail::kqueue_reactor::descriptor_state*' to '__intptr_t' asio/detail/impl/kqueue_reactor.ipp:142: error: invalid conversion from 'boost::asio::detail::kqueue_reactor::descriptor_state*' to '__intptr_t' asio/detail/impl/kqueue_reactor.ipp: In member function 'void boost::asio::detail::kqueue_reactor::run(bool, boost::asio::detail::op_queue<boost::asio::detail::task_io_service_operation>&)': asio/detail/impl/kqueue_reactor.ipp:237: error: invalid conversion from '__intptr_t' to 'void*' [...] Regards

On 14/Jan - 00:55, Marek Dopiera wrote:
Hello everybody, this is my first post to this list.
Recently I got an error when compiling a program which uses ASIO on NetBSD. It is related to kqueue. From what I see it is caused by passing descriptor_state* to EV_SET. Under NetBSD it should be intptr_t. Moreover, the udata field of kevent is implicitly cast to void* later on, which also causes an error. Explicit casts solve the issue. Maybe it's worth adding? Could someone with commit access check it and eventually correct it, please? I don't know how it is under FreeBSD, maybe an ifdef is needed to support both.
It has been fixed in 1.45 (see ticket 4662, and svn rev 66159) Regards, -- Arnaud Degroote PhD Student RIA LAAS / CNRS
participants (2)
-
Arnaud Degroote
-
Marek Dopiera