fix warnings with gcc on musl-libc #4140

merged 1 commit into from Jul 28, 2016


None yet

3 participants

James-TR commented Jul 9, 2016 edited

According to man 2 poll the correct syntax for the include is:

#include <poll.h>

There is possibly more cases of includes that can be rectified to be
more correct, however this will do for now.

Habbie commented Jul 9, 2016
  1. I presume you meant man poll, not man poll.h
  2. Just to be clear, is this something you ran into in practice?

Yes, I meant man poll

I ran into this warning when compiling under musl-libc. I found all other instances where poll.h was included in powerdns it used the #include <poll.h> format as well. Musl-libc's include wrappers always emit warnings when something doesn't use the POSIX specified paths such as the one in <sys/poll.h> below:

#warning redirecting incorrect #include <sys/poll.h> to <poll.h>
#include <poll.h>
@James-TR James-TR fix warnings with gcc on musl-libc makes an incorrect include directive of `poll.h`. The
correct syntax for inclusion, according to `man 2 poll` is:

`#include <poll.h>`

This commit prevents warnings from being displayed due to going through
musl-libc's compatibility wrappers
@James-TR James-TR changed the title from Fix incorrect include of poll.h in pdns/ to fix warnings with gcc on musl-libc Jul 19, 2016
@pieterlexis pieterlexis merged commit 40058c4 into PowerDNS:master Jul 28, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
@James-TR James-TR deleted the James-TR:fix-include-sys-poll branch Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment