summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorĐoàn Trần Công Danh <congdanhqx@gmail.com>2018-11-14 01:10:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-14 07:32:24 (GMT)
commit2648ccc231b38206e2dafe9a6cc1ca0978bcef5e (patch)
tree41b4cd2c75ffdec1fd77bf9cf314a8078151ce5d /Makefile
parentd166e6afe5f257217836ef24a73764eba390c58d (diff)
downloadgit-2648ccc231b38206e2dafe9a6cc1ca0978bcef5e.zip
git-2648ccc231b38206e2dafe9a6cc1ca0978bcef5e.tar.gz
git-2648ccc231b38206e2dafe9a6cc1ca0978bcef5e.tar.bz2
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 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 016fdcd..fe3d322 100644
--- a/Makefile
+++ b/Makefile
@@ -207,10 +207,12 @@ all::
# Define MMAP_PREVENTS_DELETE if a file that is currently mmapped cannot be
# deleted or cannot be replaced using rename().
#
+# Define NO_POLL_H if you don't have poll.h.
+#
# Define NO_SYS_POLL_H if you don't have sys/poll.h.
#
# Define NO_POLL if you do not have or don't want to use poll().
-# This also implies NO_SYS_POLL_H.
+# This also implies NO_POLL_H and NO_SYS_POLL_H.
#
# Define NEEDS_SYS_PARAM_H if you need to include sys/param.h to compile,
# *PLEASE* REPORT to git@vger.kernel.org if your platform needs this;
@@ -1460,6 +1462,7 @@ ifdef NO_GETTEXT
USE_GETTEXT_SCHEME ?= fallthrough
endif
ifdef NO_POLL
+ NO_POLL_H = YesPlease
NO_SYS_POLL_H = YesPlease
COMPAT_CFLAGS += -DNO_POLL -Icompat/poll
COMPAT_OBJS += compat/poll/poll.o
@@ -1498,6 +1501,9 @@ endif
ifdef NO_SYS_SELECT_H
BASIC_CFLAGS += -DNO_SYS_SELECT_H
endif
+ifdef NO_POLL_H
+ BASIC_CFLAGS += -DNO_POLL_H
+endif
ifdef NO_SYS_POLL_H
BASIC_CFLAGS += -DNO_SYS_POLL_H
endif