Boost C++ Libraries: Ticket #12863: some API detection #ifdefs not valid https://svn.boost.org/trac10/ticket/12863 <p> There are a couple of guards checking for APIs that are quite fragile and do not work with the latest Android NDK: (your spam detection captcha isn't working, it's issue <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/302" title="#302: Patches: Boost.Serialization for std::bitset (closed: None)">#302</a> on the android-ndk/ndk github project) </p> <p> The first is assuming <code>cfsetspeed</code> is available if <code>_BSD_SOURCE</code> is set: <a class="ext-link" href="https://github.com/boostorg/asio/blob/develop/include/boost/asio/impl/serial_port_base.ipp#L117"><span class="icon">​</span>https://github.com/boostorg/asio/blob/develop/include/boost/asio/impl/serial_port_base.ipp#L117</a> </p> <p> <code>_BSD_SOURCE</code> is something the user defines if they want access to the BSD extensions, and indicates nothing about what the implementation provides. </p> <p> Second is guarding <code>epoll_create1</code> based on the presence of <code>EPOLL_CLOEXEC</code>: <a class="ext-link" href="https://github.com/boostorg/asio/blob/develop/include/boost/asio/detail/impl/epoll_reactor.ipp#L462"><span class="icon">​</span>https://github.com/boostorg/asio/blob/develop/include/boost/asio/detail/impl/epoll_reactor.ipp#L462</a> </p> <p> This breaks implementations like the following: </p> <pre class="wiki">#define EPOLL_CLOEXEC O_CLOEXEC int epoll_create1(int) __attribute__((availability(android,introduced=21))); </pre><p> (Android here is just an example, this could well be the case on other platforms) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12863 Trac 1.4.3