Opened 6 years ago

#12419 new Patches

use POSIX poll.h instead of glibc-specific sys/poll.h

Reported by: git@… Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:

Description

POSIX specifies that <poll.h> is the correct header to include for poll()

http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html

whereas <sys/poll.h> is only needed for ancient glibc (<2.3), so let's follow POSIX instead.

As a side-effect, this silences a warnings when compiling against the musl C-library:

In file included from ./boost/asio/detail/socket_types.hpp:61:0,

from ./boost/asio/ip/address_v4.hpp:21, from ./boost/asio/ip/address.hpp:21, from libs/log/src/init_from_settings.cpp:65:

<sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]

#warning redirecting incorrect #include <sys/poll.h> to <poll.h>

etc.

Attachments (1)

0001-use-POSIX-poll.h-instead-of-glibc-specific-sys-poll..patch (1.6 KB ) - added by git@… 6 years ago.
use POSIX poll.h instead of glibc-specific sys/poll.h

Download all attachments as: .zip

Change History (1)

by git@…, 6 years ago

use POSIX poll.h instead of glibc-specific sys/poll.h

Note: See TracTickets for help on using tickets.