MB-19343: Use cb_gmtime_r instead of gmtime_r 14/63314/2
authorTrond Norbye <trond.norbye@gmail.com>
Tue, 18 Nov 2014 07:49:11 +0000 (08:49 +0100)
committerDave Rigby <daver@couchbase.com>
Mon, 25 Apr 2016 17:26:11 +0000 (17:26 +0000)
Backport / cherry-pick from: bc660d479709b5eee74357920a1940294c786216
to fix Windows build break.

Change-Id: I49d19bbea22e31bd600f694acf89d98ffa3a62f3
Reviewed-on: http://review.couchbase.org/63314
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
src/ep_engine.cc

index 160e67e..bfb2510 100644 (file)
@@ -3369,7 +3369,7 @@ ENGINE_ERROR_CODE EventuallyPersistentEngine::doEngineStats(const void *cookie,
     if (getConfiguration().isAccessScannerEnabled()) {
         char timestr[20];
         struct tm alogTim;
-        if (gmtime_r((time_t *)&epstats.alogTime, &alogTim) == NULL) {
+        if (cb_gmtime_r((time_t *)&epstats.alogTime, &alogTim) == -1) {
             add_casted_stat("ep_access_scanner_task_time", "UNKNOWN", add_stat,
                             cookie);
         } else {