From: Kefu Chai Date: Wed, 17 Aug 2016 04:12:37 +0000 (+0800) Subject: rgw: do not try to encode or decode time_t X-Git-Tag: v11.0.1~424^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a98ddf708e663aa6047c6ccf331ea2a034ac4fef;p=ceph.git 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 --- 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); }