From 589dd1e1c0828174b19180e18894b6158e26e9c6 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Sun, 12 Sep 2021 13:40:54 +0000 Subject: 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 to Submitted by: ylavic git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1893277 13f79535-47bb-0310-9956-ffa450edef68 --- include/arch/unix/apr_arch_poll_private.h | 4 +--- 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 -#endif - -#if HAVE_SYS_POLL_H +#elif HAVE_SYS_POLL_H #include #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 -#endif -#ifdef HAVE_SYS_POLL_H +#elif HAVE_SYS_POLL_H #include #endif -- cgit v1.2.1