diff options
Diffstat (limited to 'www/chromium/files/patch-base_files_dir__reader__linux.h')
-rw-r--r-- | www/chromium/files/patch-base_files_dir__reader__linux.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/www/chromium/files/patch-base_files_dir__reader__linux.h b/www/chromium/files/patch-base_files_dir__reader__linux.h index 82ff9a17eb2e..be86558f0c8b 100644 --- a/www/chromium/files/patch-base_files_dir__reader__linux.h +++ b/www/chromium/files/patch-base_files_dir__reader__linux.h @@ -1,6 +1,6 @@ ---- base/files/dir_reader_linux.h.orig 2022-06-18 05:49:12 UTC +--- base/files/dir_reader_linux.h.orig 2025-02-19 07:43:18 UTC +++ base/files/dir_reader_linux.h -@@ -16,10 +16,16 @@ +@@ -21,10 +21,16 @@ #include "base/logging.h" #include "base/posix/eintr_wrapper.h" @@ -15,25 +15,25 @@ +typedef struct dirent linux_dirent; +#else struct linux_dirent { - uint64_t d_ino; - int64_t d_off; -@@ -27,6 +33,7 @@ struct linux_dirent { - unsigned char d_type; - char d_name[0]; + uint64_t d_ino; + int64_t d_off; +@@ -32,6 +38,7 @@ struct linux_dirent { + unsigned char d_type; + char d_name[0]; }; +#endif class DirReaderLinux { public: -@@ -61,7 +68,11 @@ class DirReaderLinux { - if (offset_ != size_) +@@ -66,7 +73,11 @@ class DirReaderLinux { return true; + } +#if BUILDFLAG(IS_BSD) + const int r = getdents(fd_, reinterpret_cast<char *>(buf_), sizeof(buf_)); +#else - const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_)); + const long r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_)); +#endif - if (r == 0) + if (r == 0) { return false; - if (r == -1) { + } |