Skip to content

Commit 6ede720

Browse files
dm0-gitster
authored andcommitted
Support builds when sys/param.h is missing
An option is added to the Makefile to skip the inclusion of sys/param.h. The only known platform with this condition thus far is the z/OS UNIX System Services environment. Signed-off-by: David Michael <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bdd478d commit 6ede720

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ all::
165165
# Define NO_POLL if you do not have or don't want to use poll().
166166
# This also implies NO_SYS_POLL_H.
167167
#
168+
# Define NO_SYS_PARAM_H if you don't have sys/param.h.
169+
#
168170
# Define NO_PTHREADS if you do not have or do not want to use Pthreads.
169171
#
170172
# Define NO_PREAD if you have a problem with pread() system call (e.g.
@@ -1739,6 +1741,9 @@ endif
17391741
ifdef NO_SYS_POLL_H
17401742
BASIC_CFLAGS += -DNO_SYS_POLL_H
17411743
endif
1744+
ifdef NO_SYS_PARAM_H
1745+
BASIC_CFLAGS += -DNO_SYS_PARAM_H
1746+
endif
17421747
ifdef NO_INTTYPES_H
17431748
BASIC_CFLAGS += -DNO_INTTYPES_H
17441749
endif

configure.ac

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,12 @@ AC_CHECK_HEADER([sys/poll.h],
699699
[NO_SYS_POLL_H=UnfortunatelyYes])
700700
GIT_CONF_SUBST([NO_SYS_POLL_H])
701701
#
702+
# Define NO_SYS_PARAM_H if you don't have sys/param.h
703+
AC_CHECK_HEADER([sys/param.h],
704+
[NO_SYS_PARAM_H=],
705+
[NO_SYS_PARAM_H=UnfortunatelyYes])
706+
GIT_CONF_SUBST([NO_SYS_PARAM_H])
707+
#
702708
# Define NO_INTTYPES_H if you don't have inttypes.h
703709
AC_CHECK_HEADER([inttypes.h],
704710
[NO_INTTYPES_H=],

git-compat-util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@
104104
#endif
105105
#include <errno.h>
106106
#include <limits.h>
107+
#ifndef NO_SYS_PARAM_H
107108
#include <sys/param.h>
109+
#endif
108110
#include <sys/types.h>
109111
#include <dirent.h>
110112
#include <sys/time.h>

0 commit comments

Comments
 (0)