Build fixes

fuzzer: GetErrors() was replaced with Diagnostics()
remote-compile: Add missing header for macOS
Change-Id: I7697fd41b3cc4e3b59e10a6c395d610a51ec8daf
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59025
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
diff --git a/fuzzers/tint_spirv_tools_fuzzer/fuzzer.cc b/fuzzers/tint_spirv_tools_fuzzer/fuzzer.cc
index 29af73b..dac05dc 100644
--- a/fuzzers/tint_spirv_tools_fuzzer/fuzzer.cc
+++ b/fuzzers/tint_spirv_tools_fuzzer/fuzzer.cc
@@ -182,8 +182,8 @@
   spv_to_wgsl.EnableInspector();
   spv_to_wgsl.Run(data, size);
   if (spv_to_wgsl.HasErrors()) {
-    util::LogSpvError(spv_to_wgsl.GetErrors(), data, size,
-                      context->params.error_dir);
+    auto error = spv_to_wgsl.Diagnostics().str();
+    util::LogSpvError(error, data, size, context->params.error_dir);
     return 0;
   }
 
@@ -204,7 +204,8 @@
     fuzzer.EnableInspector();
     fuzzer.Run(reinterpret_cast<const uint8_t*>(wgsl.data()), wgsl.size());
     if (fuzzer.HasErrors()) {
-      util::LogWgslError(fuzzer.GetErrors(), data, size, wgsl, target.second,
+      auto error = spv_to_wgsl.Diagnostics().str();
+      util::LogWgslError(error, data, size, wgsl, target.second,
                          context->params.error_dir);
     }
   }
diff --git a/tools/src/cmd/remote-compile/main.cc b/tools/src/cmd/remote-compile/main.cc
index 20c1005..74ed6cb 100644
--- a/tools/src/cmd/remote-compile/main.cc
+++ b/tools/src/cmd/remote-compile/main.cc
@@ -13,6 +13,7 @@
 // limitations under the License.
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <fstream>
 #include <sstream>
 #include <string>