git-compat-util: prefer poll.h to sys/poll.h
POSIX specifies that <poll.h> is the correct header for poll(2) whereas <sys/poll.h> 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 <sys/poll.h> to <poll.h> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
d166e6afe5
commit
2648ccc231
@ -180,9 +180,12 @@
|
||||
#include <regex.h>
|
||||
#include <utime.h>
|
||||
#include <syslog.h>
|
||||
#ifndef NO_SYS_POLL_H
|
||||
#if !defined(NO_POLL_H)
|
||||
#include <poll.h>
|
||||
#elif !defined(NO_SYS_POLL_H)
|
||||
#include <sys/poll.h>
|
||||
#else
|
||||
/* Pull the compat stuff */
|
||||
#include <poll.h>
|
||||
#endif
|
||||
#ifdef HAVE_BSD_SYSCTL
|
||||
|
Reference in New Issue
Block a user