diff --git a/Makefile b/Makefile index 6b0c961d3a..f93bf1959a 100644 --- a/Makefile +++ b/Makefile @@ -157,6 +157,11 @@ all:: # Define NO_PREAD if you have a problem with pread() system call (e.g. # cygwin1.dll before v1.5.22). # +# Define NO_SETITIMER if you don't have setitimer() +# +# Define NO_STRUCT_ITIMERVAL if you don't have struct itimerval +# This also implies NO_SETITIMER +# # Define NO_THREAD_SAFE_PREAD if your pread() implementation is not # thread-safe. (e.g. compat/pread.c or cygwin) # @@ -1670,6 +1675,13 @@ endif ifdef OBJECT_CREATION_USES_RENAMES COMPAT_CFLAGS += -DOBJECT_CREATION_MODE=1 endif +ifdef NO_STRUCT_ITIMERVAL + COMPAT_CFLAGS += -DNO_STRUCT_ITIMERVAL + NO_SETITIMER=YesPlease +endif +ifdef NO_SETITIMER + COMPAT_CFLAGS += -DNO_SETITIMER +endif ifdef NO_PREAD COMPAT_CFLAGS += -DNO_PREAD COMPAT_OBJS += compat/pread.o diff --git a/git-compat-util.h b/git-compat-util.h index 35b095e8ae..3515366b12 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -162,6 +162,17 @@ #define probe_utf8_pathname_composition(a,b) #endif +#ifdef NO_STRUCT_ITIMERVAL +struct itimerval { + struct timeval it_interval; + struct timeval it_value; +} +#endif + +#ifdef NO_SETITIMER +#define setitimer(which,value,ovalue) +#endif + #ifndef NO_LIBGEN_H #include #else