diff --git a/configure.ac b/configure.ac index d7c7c7a..57eadac 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,8 @@ AC_CONFIG_MACRO_DIR([m4]) # Checks for programs. AC_GNU_SOURCE +AC_C_INLINE +AC_C_CONST AC_PROG_CC AM_PROG_CC_C_O AC_PROG_MAKE_SET diff --git a/src/include/ttail_search.h b/src/include/ttail_search.h index 8a7089c..483c541 100644 --- a/src/include/ttail_search.h +++ b/src/include/ttail_search.h @@ -91,6 +91,6 @@ const char* ttail_logline_subst(ttail_t*, const char*); *@return <0 if a0 if a>b and 0 if a == b *@todo checks */ -int ttail_tm_cmp(struct tm*, struct tm*); +int ttail_tm_cmp(const struct tm*, const struct tm*); #endif diff --git a/src/ttail_search.c b/src/ttail_search.c index 685f6b0..e80edb6 100644 --- a/src/ttail_search.c +++ b/src/ttail_search.c @@ -72,7 +72,7 @@ const char* ttail_logline_subst(ttail_t* t, const char* logline) return logline + pmatch[0].rm_eo; } -int ttail_tm_cmp(struct tm *ta, struct tm *tb) +int ttail_tm_cmp(const struct tm *ta, const struct tm *tb) { int r; r = ta->tm_year - tb->tm_year;