1.1 --- a/src/test/SDL_test_log.c Wed Nov 23 10:51:44 2016 -0500
1.2 +++ b/src/test/SDL_test_log.c Wed Nov 23 11:49:26 2016 -0500
1.3 @@ -41,6 +41,19 @@
1.4
1.5 #include "SDL_test.h"
1.6
1.7 +/* work around compiler warning on older GCCs. */
1.8 +#if (defined(__GNUC__) && (__GNUC__ <= 2))
1.9 +static size_t
1.10 +strftime_gcc2_workaround(char *s, size_t max, const char *fmt, const struct tm *tm)
1.11 +{
1.12 + return strftime(s, max, fmt, tm);
1.13 +}
1.14 +#ifdef strftime
1.15 +#undef strftime
1.16 +#endif
1.17 +#define strftime strftime_gcc2_workaround
1.18 +#endif
1.19 +
1.20 /* !
1.21 * Converts unix timestamp to its ascii representation in localtime
1.22 *