From: Sylvain Munaut Date: Thu, 8 Nov 2012 20:11:59 +0000 (-0800) Subject: rgw: use thread safe version of gmtime X-Git-Tag: v0.54~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=096c8ac953497ef627b122bd8f11f400c797b27e;p=ceph.git rgw: use thread safe version of gmtime Use gmtime_r instead of gmtime. Signed-off-by: Sylvain Munaut --- diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index 3612a9e67521..4b083aa400af 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -166,7 +166,8 @@ void dump_last_modified(struct req_state *s, time_t t) { char timestr[TIME_BUF_SIZE]; - struct tm *tmp = gmtime(&t); + struct tm result; + struct tm *tmp = gmtime_r(&t, &result); if (tmp == NULL) return;