From 6f1871bc856dab56b0850afbdd7bbd993d190a93 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Tue, 4 Apr 2017 11:42:37 +0200 Subject: [PATCH] rgw: switch to std::array in RGWBulkUploadOp due to C++11 and FreeBSD. Before this patch RGWBulkUploadOp::terminal_errors was declared as std::initializer_list. Unfortunately, a constexpr constructor for it is available since C++14, not C++11. This was causing build failures on FreeBSD. Signed-off-by: Radoslaw Zarzynski --- src/rgw/rgw_op.cc | 2 +- src/rgw/rgw_op.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index a4572dd3a94..4812033aea4 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -5499,7 +5499,7 @@ void RGWBulkDelete::execute() } -constexpr std::initializer_list RGWBulkUploadOp::terminal_errors; +constexpr std::array RGWBulkUploadOp::terminal_errors; int RGWBulkUploadOp::verify_permission() { diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h index abb1969eec9..9aa41eca24a 100644 --- a/src/rgw/rgw_op.h +++ b/src/rgw/rgw_op.h @@ -13,6 +13,7 @@ #include +#include #include #include #include @@ -402,8 +403,8 @@ protected: const std::string path; }; - static constexpr std::initializer_list terminal_errors = { - -EACCES, -EPERM + static constexpr std::array terminal_errors = { + { -EACCES, -EPERM } }; /* FIXME: boost::container::small_vector failures; */ -- 2.39.5