X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Ffmt_compile.c;h=6baabdc76ebbe91c9ca1c4be8ee3b46d4a49441c;hb=97e7d6f2f5db4e8f09cb015ee6c2da2ff129f963;hp=339ac0a21b51fb54f936de173f087068e1dffe0d;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b;p=mmh diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 339ac0a..6baabdc 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -7,10 +7,21 @@ #include #include -#include +#include #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)