Skip to content

Commit 7dded66

Browse files
committed
Merge branch 'jt/itimer-autoconf'
setitmer(2) and related API elements can be configured from Makefile but autoconf did not know about it. * jt/itimer-autoconf: autoconf: check for setitimer() autoconf: check for struct itimerval git-compat-util.h: add missing semicolon after struct itimerval
2 parents 0ba92ef + a6fd4fb commit 7dded66

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

configure.ac

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,14 @@ case $ac_cv_type_socklen_t in
746746
esac
747747
GIT_CONF_SUBST([SOCKLEN_T])
748748

749+
#
750+
# Define NO_STRUCT_ITIMERVAL if you don't have struct itimerval.
751+
AC_CHECK_TYPES([struct itimerval],
752+
[NO_STRUCT_ITIMERVAL=],
753+
[NO_STRUCT_ITIMERVAL=UnfortunatelyYes],
754+
[#include <sys/time.h>])
755+
GIT_CONF_SUBST([NO_STRUCT_ITIMERVAL])
756+
#
749757
# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
750758
AC_CHECK_MEMBER(struct dirent.d_ino,
751759
[NO_D_INO_IN_DIRENT=],
@@ -903,6 +911,12 @@ AC_CHECK_LIB([iconv], [locale_charset],
903911
[CHARSET_LIB=-lcharset])])
904912
GIT_CONF_SUBST([CHARSET_LIB])
905913
#
914+
# Define NO_SETITIMER if you don't have setitimer.
915+
GIT_CHECK_FUNC(setitimer,
916+
[NO_SETITIMER=],
917+
[NO_SETITIMER=YesPlease])
918+
GIT_CONF_SUBST([NO_SETITIMER])
919+
#
906920
# Define NO_STRCASESTR if you don't have strcasestr.
907921
GIT_CHECK_FUNC(strcasestr,
908922
[NO_STRCASESTR=],

git-compat-util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ extern int compat_mkdir_wo_trailing_slash(const char*, mode_t);
192192
struct itimerval {
193193
struct timeval it_interval;
194194
struct timeval it_value;
195-
}
195+
};
196196
#endif
197197

198198
#ifdef NO_SETITIMER

0 commit comments

Comments
 (0)