GNU C library for struct tm has 2 additional fields.

Summary:
initialize 2 additional fields tm_gmtoff and tm_zone,
otherwise under strict warnings for initialization, we get errors
in myrocks.
Closes https://github.com/facebook/rocksdb/pull/2439

Differential Revision: D5229013

Pulled By: yiwu-arbug

fbshipit-source-id: 9fc1615a1919656f36064791706ed41e10e9db84
This commit is contained in:
Anirban Rahut 2017-06-13 04:33:54 -07:00 committed by Facebook Github Bot
parent d713471da8
commit 7a270069b3

3
env/mock_env.cc vendored
View File

@ -378,7 +378,8 @@ class TestMemLogger : public Logger {
struct timeval now_tv;
gettimeofday(&now_tv, nullptr);
const time_t seconds = now_tv.tv_sec;
struct tm t{0, 0, 0, 0, 0, 0, 0, 0, 0};
struct tm t;
memset(&t, 0, sizeof(t));
auto ret __attribute__((__unused__)) = localtime_r(&seconds, &t);
assert(ret);
p += snprintf(p, limit - p,