Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andred
Copy link

@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