Boost logo

Boost :

Subject: [boost] [ASIO] Compilation error on NetBSD
From: Marek Dopiera (siersciu_at_[hidden])
Date: 2011-01-13 18:55:43

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::reactor_op*, bool)':
asio/detail/impl/kqueue_reactor.ipp:132: error: invalid conversion
from 'boost::asio::detail::kqueue_reactor::descriptor_state*' to
asio/detail/impl/kqueue_reactor.ipp:136: error: invalid conversion
from 'boost::asio::detail::kqueue_reactor::descriptor_state*' to
asio/detail/impl/kqueue_reactor.ipp:142: error: invalid conversion
from 'boost::asio::detail::kqueue_reactor::descriptor_state*' to
asio/detail/impl/kqueue_reactor.ipp: In member function 'void
asio/detail/impl/kqueue_reactor.ipp:237: error: invalid conversion
from '__intptr_t' to 'void*'


Boost list run by bdawes at, gregod at, cpdaniel at, john at