File 0009-47295.patch of Package ceph-ceph-15.2.17

diff --git a/src/include/buffer.h b/src/include/buffer.h
index 5c8b427d030..4af9b040040 100644
--- a/src/include/buffer.h
+++ b/src/include/buffer.h
@@ -41,6 +41,7 @@
 #include <iosfwd>
 #include <iomanip>
 #include <list>
+#include <memory>
 #include <vector>
 #include <string>
 #if __cplusplus >= 201703L
diff --git a/src/rgw/rgw_string.h b/src/rgw/rgw_string.h
index d7ccc9f06d2..64e264c101b 100644
--- a/src/rgw/rgw_string.h
+++ b/src/rgw/rgw_string.h
@@ -7,6 +7,8 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <limits.h>
+#include <string>
+#include <stdexcept>
 
 #include <boost/container/small_vector.hpp>
 #include <boost/utility/string_view.hpp>
diff --git a/src/test/encoding.cc b/src/test/encoding.cc
index 4f91ecc4deb..e8af8b7f215 100644
--- a/src/test/encoding.cc
+++ b/src/test/encoding.cc
@@ -334,11 +334,11 @@ void lame_decoder(int which) {
 }
 
 TEST(EncodingException, Macros) {
-  for (unsigned i = 0; i < sizeof(expected_what)/sizeof(expected_what[0]); i++) {
+  for (unsigned i = 0; i < std::size(expected_what); i++) {
     try {
       lame_decoder(i);
     } catch (const exception& e) {
-      ASSERT_EQ(string(expected_what[i]), string(e.what()));
+      ASSERT_NE(string(e.what()).find(expected_what[i]), string::npos);
     }
   }
 }
openSUSE Build Service is sponsored by