From 2528f9d07017cf7cc77f4c02a993d97074db0596 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rados=C5=82aw=20Zarzy=C5=84ski?= Date: Sun, 3 Apr 2022 11:53:04 +0200 Subject: [PATCH] common/bl: fix FTBFS on C++11 due to C++17's if-with-initializer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: https://tracker.ceph.com/issues/55233 Signed-off-by: Radosław Zarzyński --- src/include/buffer.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/include/buffer.h b/src/include/buffer.h index 5e3fdf4b40bd4..a00d10a4d26e4 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -865,7 +865,9 @@ struct error_code; if (first_round) { impl_f(first_round); } - if (const auto second_round = len - first_round; second_round) { + // no C++17 for the sake of the C++11 guarantees of librados, sorry. + const auto second_round = len - first_round; + if (second_round) { _refill(second_round); impl_f(second_round); } -- 2.39.5