Skip to content

Commit 3cf3237

Browse files
jnarebgitster
authored andcommitted
autoconf: define NO_SYS_SELECT_H on systems without <sys/select.h>.
Pre-POSIX.1-2001 systems don't have <sys/select.h>, but select(2) is declared in <sys/time.h>, which git-compat-util.h includes. Signed-off-by: Jakub Narebski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 81cc66a commit 3cf3237

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

config.mak.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ NO_CURL=@NO_CURL@
3030
NO_EXPAT=@NO_EXPAT@
3131
NEEDS_LIBICONV=@NEEDS_LIBICONV@
3232
NEEDS_SOCKET=@NEEDS_SOCKET@
33+
NO_SYS_SELECT_H=@NO_SYS_SELECT_H@
3334
NO_D_INO_IN_DIRENT=@NO_D_INO_IN_DIRENT@
3435
NO_D_TYPE_IN_DIRENT=@NO_D_TYPE_IN_DIRENT@
3536
NO_SOCKADDR_STORAGE=@NO_SOCKADDR_STORAGE@

configure.ac

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ test -n "$NEEDS_SOCKET" && LIBS="$LIBS -lsocket"
235235
## Checks for header files.
236236
AC_MSG_NOTICE([CHECKS for header files])
237237
#
238+
# Define NO_SYS_SELECT_H if you don't have sys/select.h.
239+
AC_CHECK_HEADER([sys/select.h],
240+
[NO_SYS_SELECT_H=],
241+
[NO_SYS_SELECT_H=UnfortunatelyYes])
242+
AC_SUBST(NO_SYS_SELECT_H)
243+
#
238244
# Define OLD_ICONV if your library has an old iconv(), where the second
239245
# (input buffer pointer) parameter is declared with type (const char **).
240246
AC_DEFUN([OLDICONVTEST_SRC], [[

0 commit comments

Comments
 (0)