diff options
author | Đoàn Trần Công Danh <congdanhqx@gmail.com> | 2018-11-14 08:10:43 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-14 16:32:24 +0900 |
commit | 2648ccc231b38206e2dafe9a6cc1ca0978bcef5e (patch) | |
tree | 41b4cd2c75ffdec1fd77bf9cf314a8078151ce5d /configure.ac | |
parent | d166e6afe5f257217836ef24a73764eba390c58d (diff) | |
download | git-2648ccc231b38206e2dafe9a6cc1ca0978bcef5e.tar.gz |
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>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e11b7976ab..908e66a972 100644 --- a/configure.ac +++ b/configure.ac @@ -792,6 +792,12 @@ AC_CHECK_HEADER([sys/select.h], [NO_SYS_SELECT_H=UnfortunatelyYes]) GIT_CONF_SUBST([NO_SYS_SELECT_H]) # +# Define NO_POLL_H if you don't have poll.h +AC_CHECK_HEADER([poll.h], +[NO_POLL_H=], +[NO_POLL_H=UnfortunatelyYes]) +GIT_CONF_SUBST([NO_POLL_H]) +# # Define NO_SYS_POLL_H if you don't have sys/poll.h AC_CHECK_HEADER([sys/poll.h], [NO_SYS_POLL_H=], |