X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Ffmt_compile.c;h=e857c7d9bc658d9efd0a7f678230c4b61a241739;hb=e1aadb9e23f706d4b19f49d1e7a6995a5b3c59e2;hp=339ac0a21b51fb54f936de173f087068e1dffe0d;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b;p=mmh diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 339ac0a..e857c7d 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -11,6 +11,17 @@ #include #include +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef TM_IN_SYS_TIME +# include +# else +# include +# endif +#endif + /* * hash table for deciding if a component is "interesting" */ @@ -259,6 +270,7 @@ fmt_compile(char *fstring, struct format **fmt) * normal processing. */ i = strlen(fstring)/2 + 1; + if (i==1) i++; next_fp = formatvec = (struct format *)calloc ((size_t) i, sizeof(struct format)); if (next_fp == NULL)