summaryrefslogtreecommitdiff
path: root/sfeed_mbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'sfeed_mbox.c')
-rw-r--r--sfeed_mbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfeed_mbox.c b/sfeed_mbox.c
index 5803cea..d16b8d3 100644
--- a/sfeed_mbox.c
+++ b/sfeed_mbox.c
@@ -57,7 +57,7 @@ static void
printfeed(FILE *fp, const char *feedname)
{
char *fields[FieldLast], timebuf[32];
- struct tm *tm;
+ struct tm parsedtm, *tm;
time_t parsedtime;
unsigned long hash;
ssize_t linelen;
@@ -74,7 +74,7 @@ printfeed(FILE *fp, const char *feedname)
parsedtime = 0;
if (!strtotime(fields[FieldUnixTimestamp], &parsedtime) &&
- (tm = gmtime(&parsedtime)) &&
+ (tm = gmtime_r(&parsedtime, &parsedtm)) &&
strftime(timebuf, sizeof(timebuf), "%a, %d %b %Y %H:%M:%S +0000", tm)) {
printf("Date: %s\n", timebuf);
} else {