summaryrefslogtreecommitdiff
path: root/compat/gmtime.c
AgeCommit message (Collapse)AuthorFilesLines
2014-04-01date: recognize bogus FreeBSD gmtime outputLibravatar Jeff King1-0/+29
Most gmtime implementations return a NULL value when they encounter an error (and this behavior is specified by ANSI C and POSIX). FreeBSD's implementation, however, will simply leave the "struct tm" untouched. Let's also recognize this and convert it to a NULL (with this patch, t4212 should pass on FreeBSD). Reported-by: René Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>