Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(754)

Unified Diff: runtime/bin/directory_android.cc

Issue 1761953002: Fix x86-64 Android build. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/signal_handler_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/directory_android.cc
diff --git a/runtime/bin/directory_android.cc b/runtime/bin/directory_android.cc
index 5d2464902b28456861fb878f739cf4b2f5c7f8d3..40bcde3f64f431c80f2b4bc12f79243371c7ee00 100644
--- a/runtime/bin/directory_android.cc
+++ b/runtime/bin/directory_android.cc
@@ -373,19 +373,6 @@ bool Directory::Create(const char* dir_name) {
}
-// Android doesn't currently provide mkdtemp. Once Android provied mkdtemp,
zra 2016/03/03 18:54:04 This comment appears to have been inaccurate. mkdt
-// remove this function in favor of calling mkdtemp directly.
-static char* MakeTempDirectory(char* path_template) {
- if (mktemp(path_template) == NULL) {
- return NULL;
- }
- if (mkdir(path_template, 0700) != 0) {
- return NULL;
- }
- return path_template;
-}
-
-
char* Directory::SystemTemp() {
// Android does not have a /tmp directory. A partial substitute,
// suitable for bring-up work and tests, is to create a tmp
@@ -416,7 +403,7 @@ char* Directory::CreateTemp(const char* prefix) {
}
char* result;
do {
- result = MakeTempDirectory(path.AsString());
+ result = mkdtemp(path.AsString());
} while (result == NULL && errno == EINTR);
if (result == NULL) {
return NULL;
« no previous file with comments | « no previous file | runtime/vm/signal_handler_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698