Index: runtime/bin/fdutils_android.cc |
diff --git a/runtime/bin/fdutils_android.cc b/runtime/bin/fdutils_android.cc |
index 5d8a8e004c301b150914899ff580c167d7c7a701..ad5b91ed1003e4f762b9d50b98f79c87f905d92f 100644 |
--- a/runtime/bin/fdutils_android.cc |
+++ b/runtime/bin/fdutils_android.cc |
@@ -137,6 +137,13 @@ ssize_t FDUtils::WriteToBlocking(int fd, const void* buffer, size_t count) { |
return count; |
} |
+ |
+void FDUtils::SaveErrorAndClose(intptr_t fd) { |
+ int err = errno; |
+ VOID_TEMP_FAILURE_RETRY(close(fd)); |
+ errno = err; |
+} |
+ |
} // namespace bin |
} // namespace dart |