Skip to content

Commit 1c6e646

Browse files
committed
Merge branch 'dd/poll-dot-h'
A build update. * dd/poll-dot-h: git-compat-util: prefer poll.h to sys/poll.h
2 parents f5f0f68 + 2648ccc commit 1c6e646

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,12 @@ all::
210210
# Define MMAP_PREVENTS_DELETE if a file that is currently mmapped cannot be
211211
# deleted or cannot be replaced using rename().
212212
#
213+
# Define NO_POLL_H if you don't have poll.h.
214+
#
213215
# Define NO_SYS_POLL_H if you don't have sys/poll.h.
214216
#
215217
# Define NO_POLL if you do not have or don't want to use poll().
216-
# This also implies NO_SYS_POLL_H.
218+
# This also implies NO_POLL_H and NO_SYS_POLL_H.
217219
#
218220
# Define NEEDS_SYS_PARAM_H if you need to include sys/param.h to compile,
219221
# *PLEASE* REPORT to [email protected] if your platform needs this;
@@ -1456,6 +1458,7 @@ ifdef NO_GETTEXT
14561458
USE_GETTEXT_SCHEME ?= fallthrough
14571459
endif
14581460
ifdef NO_POLL
1461+
NO_POLL_H = YesPlease
14591462
NO_SYS_POLL_H = YesPlease
14601463
COMPAT_CFLAGS += -DNO_POLL -Icompat/poll
14611464
COMPAT_OBJS += compat/poll/poll.o
@@ -1494,6 +1497,9 @@ endif
14941497
ifdef NO_SYS_SELECT_H
14951498
BASIC_CFLAGS += -DNO_SYS_SELECT_H
14961499
endif
1500+
ifdef NO_POLL_H
1501+
BASIC_CFLAGS += -DNO_POLL_H
1502+
endif
14971503
ifdef NO_SYS_POLL_H
14981504
BASIC_CFLAGS += -DNO_SYS_POLL_H
14991505
endif

configure.ac

+6
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,12 @@ AC_CHECK_HEADER([sys/select.h],
789789
[NO_SYS_SELECT_H=UnfortunatelyYes])
790790
GIT_CONF_SUBST([NO_SYS_SELECT_H])
791791
#
792+
# Define NO_POLL_H if you don't have poll.h
793+
AC_CHECK_HEADER([poll.h],
794+
[NO_POLL_H=],
795+
[NO_POLL_H=UnfortunatelyYes])
796+
GIT_CONF_SUBST([NO_POLL_H])
797+
#
792798
# Define NO_SYS_POLL_H if you don't have sys/poll.h
793799
AC_CHECK_HEADER([sys/poll.h],
794800
[NO_SYS_POLL_H=],

git-compat-util.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,12 @@
180180
#include <regex.h>
181181
#include <utime.h>
182182
#include <syslog.h>
183-
#ifndef NO_SYS_POLL_H
183+
#if !defined(NO_POLL_H)
184+
#include <poll.h>
185+
#elif !defined(NO_SYS_POLL_H)
184186
#include <sys/poll.h>
185187
#else
188+
/* Pull the compat stuff */
186189
#include <poll.h>
187190
#endif
188191
#ifdef HAVE_BSD_SYSCTL

0 commit comments

Comments
 (0)