From a98ddf708e663aa6047c6ccf331ea2a034ac4fef Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 17 Aug 2016 12:12:37 +0800 Subject: [PATCH] rgw: do not try to encode or decode time_t time_t is `signed int` on linux, which is ambiguous when encode() or decode() on i386-linux. see also 8f9e7b0b. Signed-off-by: Kefu Chai --- src/cls/rgw/cls_rgw_types.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cls/rgw/cls_rgw_types.h b/src/cls/rgw/cls_rgw_types.h index 7527db7c7276..17697d292b70 100644 --- a/src/cls/rgw/cls_rgw_types.h +++ b/src/cls/rgw/cls_rgw_types.h @@ -939,14 +939,17 @@ struct cls_rgw_lc_obj_head void encode(bufferlist& bl) const { ENCODE_START(1, 1, bl); - ::encode(start_date, bl); + uint64_t t = start_date; + ::encode(t, bl); ::encode(marker, bl); ENCODE_FINISH(bl); } void decode(bufferlist::iterator& bl) { DECODE_START(1, bl); - ::decode(start_date, bl); + uint64_t t; + ::decode(t, bl); + start_date = static_cast(t); ::decode(marker, bl); DECODE_FINISH(bl); } -- 2.47.3