diff options
Diffstat (limited to 'ext/ftp/ftp.c')
-rw-r--r-- | ext/ftp/ftp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 47131efa31..0e39e89cf5 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -609,7 +609,7 @@ time_t ftp_mdtm(ftpbuf_t *ftp, const char *path) { time_t stamp; - struct tm *gmt; + struct tm *gmt, tmbuf; struct tm tm; char *ptr; int n; @@ -635,7 +635,7 @@ ftp_mdtm(ftpbuf_t *ftp, const char *path) /* figure out the GMT offset */ stamp = time(NULL); - gmt = gmtime(&stamp); + gmt = gmtime_r(&stamp, &tmbuf); gmt->tm_isdst = -1; /* apply the GMT offset */ |