Since we're decoding 32-bit integers, just use uint32_t and then cast them to
what utime_t expects.
Fixes: http://tracker.ceph.com/issues/15330
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
template<typename Clock, typename Duration>
void decode(std::chrono::time_point<Clock, Duration>& t,
bufferlist::iterator& p) {
- uint32_t s, ns;
+ uint32_t s;
+ uint32_t ns;
::decode(s, p);
::decode(ns, p);
- struct timespec ts = {s, ns};
+ struct timespec ts = {
+ static_cast<time_t>(s),
+ static_cast<long int>(ns)};
t = Clock::from_timespec(ts);
}