From 14af86f64610525fd68a3fa6d30a102a10b4dcd7 Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Wed, 20 May 2020 09:50:58 +0000 Subject: [PATCH] rgw: replace deleted std function: randomshuffle fixes: https://github.com/ceph/ceph/pull/32927 Signed-off-by: Willem Jan Withagen --- src/rgw/rgw_lc.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 7d083272bfe65..6e9bcdb7c7d21 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -1646,7 +1646,9 @@ static inline vector random_sequence(uint32_t n) [ix = 0]() mutable { return ix++; }); - std::random_shuffle(v.begin(), v.end()); + std::random_device rd; + std::default_random_engine rng{rd()}; + std::shuffle(v.begin(), v.end(), rd); return v; } -- 2.39.5