#ifdef _POSIX_SYNCHRONIZED_IO
if ((Flags & ReadOnly) != ReadOnly)
- if (msync((char *)Base,iSize,MS_SYNC) != 0)
+ if (msync((char *)Base,iSize,MS_SYNC) < 0)
return _error->Errno("msync","Unable to write mmap");
#endif
return true;
#ifdef _POSIX_SYNCHRONIZED_IO
unsigned long PSize = sysconf(_SC_PAGESIZE);
if ((Flags & ReadOnly) != ReadOnly)
- if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) != 0)
+ if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) < 0)
return _error->Errno("msync","Unable to write mmap");
#endif
return true;
+apt (0.7.6ubuntu11) UNRELEASED; urgency=low
+
+ * apt-pkg/contrib/mmap.cc:
+ - don't fail if msync() returns > 0 (LP: #144001)
+
+ -- Colin Watson <cjwatson@ubuntu.com> Sat, 22 Sep 2007 21:21:19 +0100
+
apt (0.7.6ubuntu10) gutsy; urgency=low
* apt-pkg/deb/dpkgpm.cc: