time_t's width varies between machines. Also it fails to compile on 32
bit linux.
Fixes: http://tracker.ceph.com/issues/15330
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
::encode(olh_epoch, bl);
::encode(log_op, bl);
::encode(bilog_flags, bl);
- time_t t = ceph::real_clock::to_time_t(unmod_since);
+ uint64_t t = ceph::real_clock::to_time_t(unmod_since);
::encode(t, bl);
::encode(unmod_since, bl);
::encode(high_precision_time, bl);
::decode(log_op, bl);
::decode(bilog_flags, bl);
if (struct_v == 2) {
- time_t t;
+ uint64_t t;
::decode(t, bl);
- unmod_since = ceph::real_clock::from_time_t(t);
+ unmod_since = ceph::real_clock::from_time_t(static_cast<time_t>(t));
}
if (struct_v >= 3) {
::decode(unmod_since, bl);