Skip to content

use POSIX poll.h instead of sys/poll.h#3

Open
andred wants to merge 1 commit into
andreas-volz:masterfrom
andred:master
Open

use POSIX poll.h instead of sys/poll.h#3
andred wants to merge 1 commit into
andreas-volz:masterfrom
andred:master

Conversation

@andred
Copy link
Copy Markdown

@andred andred commented Nov 25, 2016

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 compilation warnings when
compiling against the musl C-library such as:

| In file included from ../../libdbus-c++-0.9.0/src/eventloop.cpp:31:0:
| /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>
| ^~~~~~~
| In file included from ../../libdbus-c++-0.9.0/src/eventloop-integration.cpp:39:0:
| /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>
| ^~~~~~~

Signed-off-by: André Draszik git@andred.net

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 compilation warnings when
compiling against the musl C-library such as:

| In file included from ../../libdbus-c++-0.9.0/src/eventloop.cpp:31:0:
| <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>
|   ^~~~~~~
| In file included from ../../libdbus-c++-0.9.0/src/eventloop-integration.cpp:39:0:
| <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>
|   ^~~~~~~

Signed-off-by: André Draszik <git@andred.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant