From 2648ccc231b38206e2dafe9a6cc1ca0978bcef5e Mon Sep 17 00:00:00 2001 From: Đoàn Trần Công Danh Date: Wed, 14 Nov 2018 08:10:43 +0700 Subject: git-compat-util: prefer poll.h to sys/poll.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit POSIX specifies that is the correct header for poll(2) whereas is only needed for some old libc. Let's follow the POSIX way by default. This effectively eliminates musl's warning: warning redirecting incorrect #include to Signed-off-by: Đoàn Trần Công Danh Signed-off-by: Junio C Hamano --- git-compat-util.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'git-compat-util.h') diff --git a/git-compat-util.h b/git-compat-util.h index 3a08d9916f..f16058182f 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -180,9 +180,12 @@ #include #include #include -#ifndef NO_SYS_POLL_H +#if !defined(NO_POLL_H) +#include +#elif !defined(NO_SYS_POLL_H) #include #else +/* Pull the compat stuff */ #include #endif #ifdef HAVE_BSD_SYSCTL -- cgit v1.2.3