diff options
Diffstat (limited to 'www/chromium/files/patch-base_files_file__util__posix.cc')
-rw-r--r-- | www/chromium/files/patch-base_files_file__util__posix.cc | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/www/chromium/files/patch-base_files_file__util__posix.cc b/www/chromium/files/patch-base_files_file__util__posix.cc index 53e25ed562e5..d906280bcf53 100644 --- a/www/chromium/files/patch-base_files_file__util__posix.cc +++ b/www/chromium/files/patch-base_files_file__util__posix.cc @@ -1,6 +1,6 @@ ---- base/files/file_util_posix.cc.orig 2021-01-18 21:28:44 UTC +--- base/files/file_util_posix.cc.orig 2021-03-12 23:57:15 UTC +++ base/files/file_util_posix.cc -@@ -406,7 +406,7 @@ bool CreatePipe(ScopedFD* read_fd, ScopedFD* write_fd, +@@ -380,7 +380,7 @@ bool CreatePipe(ScopedFD* read_fd, ScopedFD* write_fd, } bool CreateLocalNonBlockingPipe(int fds[2]) { @@ -9,7 +9,7 @@ return pipe2(fds, O_CLOEXEC | O_NONBLOCK) == 0; #else int raw_fds[2]; -@@ -953,8 +953,12 @@ bool AllocateFileRegion(File* file, int64_t offset, si +@@ -927,8 +927,12 @@ bool AllocateFileRegion(File* file, int64_t offset, si // space. It can fail because the filesystem doesn't support it. In that case, // use the manual method below. @@ -23,7 +23,25 @@ return true; DPLOG(ERROR) << "fallocate"; #elif defined(OS_APPLE) -@@ -1178,7 +1182,7 @@ PrefetchResult PreReadFile(const FilePath& file_path, +@@ -1098,7 +1102,7 @@ int GetMaximumPathComponentLength(const FilePath& path + #if !defined(OS_ANDROID) + // This is implemented in file_util_android.cc for that platform. + bool GetShmemTempDir(bool executable, FilePath* path) { +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) || defined(OS_BSD) + bool disable_dev_shm = false; + #if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS) + disable_dev_shm = CommandLine::ForCurrentProcess()->HasSwitch( +@@ -1114,7 +1118,7 @@ bool GetShmemTempDir(bool executable, FilePath* path) + *path = FilePath("/dev/shm"); + return true; + } +-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) ++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX) || defined(OS_BSD) + return GetTempDir(path); + } + #endif // !defined(OS_ANDROID) +@@ -1152,7 +1156,7 @@ PrefetchResult PreReadFile(const FilePath& file_path, // posix_fadvise() is only available in the Android NDK in API 21+. Older // versions may have the required kernel support, but don't have enough usage // to justify backporting. @@ -32,7 +50,7 @@ (defined(OS_ANDROID) && __ANDROID_API__ >= 21) File file(file_path, File::FLAG_OPEN | File::FLAG_READ); if (!file.IsValid()) -@@ -1214,7 +1218,7 @@ PrefetchResult PreReadFile(const FilePath& file_path, +@@ -1188,7 +1192,7 @@ PrefetchResult PreReadFile(const FilePath& file_path, return internal::PreReadFileSlow(file_path, max_bytes) ? PrefetchResult{PrefetchResultCode::kSlowSuccess} : PrefetchResult{PrefetchResultCode::kSlowFailed}; @@ -41,7 +59,7 @@ // __ANDROID_API__ >= 21) } -@@ -1249,7 +1253,7 @@ bool MoveUnsafe(const FilePath& from_path, const FileP +@@ -1223,7 +1227,7 @@ bool MoveUnsafe(const FilePath& from_path, const FileP #endif // !defined(OS_NACL_NONSFI) @@ -50,7 +68,7 @@ BASE_EXPORT bool IsPathExecutable(const FilePath& path) { bool result = false; FilePath tmp_file_path; -@@ -1270,6 +1274,6 @@ BASE_EXPORT bool IsPathExecutable(const FilePath& path +@@ -1244,6 +1248,6 @@ BASE_EXPORT bool IsPathExecutable(const FilePath& path } return result; } |