on armhf, `unsigned int` is 32bit, and `size_t` is defined as `unsigned
int`, so `std::min(a_size_t, a_uint32_t)` is not able to deduce the
template parameter, so we need to either use a single type or specialize
this template.
because `actual` will eventually used as a parameter of
`buffer::list::splice(unsigned, unsigned, buffer::list)`, it's at least
not worse to use `std::min<size_t>()` on a 32-bit system. on a LP64
system, `actual` will be casted to `unsigned` when calling
`bl.splice()` with or without this change.
Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph_assert(s->first <= *bl_off);
size_t left = (s->first + s->second) - *bl_off;
- size_t actual = std::min(left, tlen);
+ size_t actual = std::min<size_t>(left, tlen);
if (actual > 0) {
ldout(cct, 20) << " s has " << actual << ", copying" << dendl;