--- a/tiledb/sm/filter/test/unit_xor_pipeline.cc
+++ b/tiledb/sm/filter/test/unit_xor_pipeline.cc
@@ -34,6 +34,7 @@
 
 #include <test/support/src/mem_helpers.h>
 #include <test/support/tdb_catch.h>
+#include <random>
 
 #include "../bit_width_reduction_filter.h"
 #include "../bitshuffle_filter.h"
--- a/tiledb/sm/filter/test/unit_bit_width_reduction_pipeline.cc
+++ b/tiledb/sm/filter/test/unit_bit_width_reduction_pipeline.cc
@@ -34,6 +34,7 @@
 
 #include <test/support/src/mem_helpers.h>
 #include <test/support/tdb_catch.h>
+#include <random>
 #include "../bit_width_reduction_filter.h"
 #include "filter_test_support.h"
 
--- a/test/src/unit-s3.cc
+++ b/test/src/unit-s3.cc
@@ -397,7 +397,7 @@
     for (size_t i = 0; i < expected.size(); i++) {
       auto s3_object = results_vector[i];
       CHECK(file_filter(s3_object.GetKey(), s3_object.GetSize()));
-      auto full_uri = s3_test.temp_dir_.to_string() + "/" + s3_object.GetKey();
+      auto full_uri = s3_test.temp_dir_.to_string() + "/" + s3_object.GetKey().c_str();
       CHECK(full_uri == expected[i].first);
       CHECK(static_cast<uint64_t>(s3_object.GetSize()) == expected[i].second);
     }
@@ -449,7 +449,7 @@
   CHECK(results_vector.size() == expected.size());
   for (size_t i = 0; i < expected.size(); i++) {
     auto s3_object = results_vector[i];
-    auto full_uri = s3_test.temp_dir_.to_string() + "/" + s3_object.GetKey();
+    auto full_uri = s3_test.temp_dir_.to_string() + "/" + s3_object.GetKey().c_str();
     CHECK(full_uri == expected[i].first);
     CHECK(static_cast<uint64_t>(s3_object.GetSize()) == expected[i].second);
   }
