diff options
author | Yann Ylavic <ylavic@apache.org> | 2021-09-12 13:40:54 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2021-09-12 13:40:54 +0000 |
commit | 589dd1e1c0828174b19180e18894b6158e26e9c6 (patch) | |
tree | 14a419c73a75671220b32f9bbcef878107154589 | |
parent | 7ac8cfcce87a5dc0a0a3993ab47976f5f64d3044 (diff) | |
download | apr-589dd1e1c0828174b19180e18894b6158e26e9c6.tar.gz |
Merge r1893198 from trunk:
poll: don't #include sys/poll.h if poll.h is available.
With musl libc, this fixes:
#warning redirecting incorrect #include <sys/poll.h> to <poll.h>
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1893277 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | include/arch/unix/apr_arch_poll_private.h | 4 | ||||
-rw-r--r-- | support/unix/waitio.c | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/include/arch/unix/apr_arch_poll_private.h b/include/arch/unix/apr_arch_poll_private.h index ff8131231..4c2aaa704 100644 --- a/include/arch/unix/apr_arch_poll_private.h +++ b/include/arch/unix/apr_arch_poll_private.h @@ -19,9 +19,7 @@ #if HAVE_POLL_H #include <poll.h> -#endif - -#if HAVE_SYS_POLL_H +#elif HAVE_SYS_POLL_H #include <sys/poll.h> #endif diff --git a/support/unix/waitio.c b/support/unix/waitio.c index 0d762ea6d..fa5edb65e 100644 --- a/support/unix/waitio.c +++ b/support/unix/waitio.c @@ -30,10 +30,9 @@ #ifdef WAITIO_USES_POLL -#ifdef HAVE_POLL_H +#if HAVE_POLL_H #include <poll.h> -#endif -#ifdef HAVE_SYS_POLL_H +#elif HAVE_SYS_POLL_H #include <sys/poll.h> #endif |