Bug 787588 - d_reclen is dead on DragonFly since 64bit inode support. r=landry
authorJan Beich <jbeich@tormail.org>
Thu, 06 Sep 2012 21:47:27 +0200
changeset 104506 186b0a9bd97be7597dece5b3f3a9450bf873eee9
parent 104505 864f3ea3c16487d9b9bd7c60350e128d3cb3eb95
child 104507 76ef86e0fd8c733338fbe20df400602719028689
push id23428
push useremorley@mozilla.com
push dateFri, 07 Sep 2012 14:53:19 +0000
treeherdermozilla-central@efccc8f21e32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslandry
bugs787588
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 787588 - d_reclen is dead on DragonFly since 64bit inode support. r=landry
ipc/chromium/src/base/dir_reader_bsd.h
--- a/ipc/chromium/src/base/dir_reader_bsd.h
+++ b/ipc/chromium/src/base/dir_reader_bsd.h
@@ -44,17 +44,21 @@ class DirReaderBSD {
   bool IsValid() const {
     return fd_ >= 0;
   }
 
   // Move to the next entry returning false if the iteration is complete.
   bool Next() {
     if (size_) {
       struct dirent* dirent = reinterpret_cast<struct dirent*>(&buf_[offset_]);
+#ifdef OS_DRAGONFLY
+      offset_ += _DIRENT_DIRSIZ(dirent);
+#else
       offset_ += dirent->d_reclen;
+#endif
     }
 
     if (offset_ != size_)
       return true;
 
 #ifdef OS_OPENBSD
     const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_);
 #else