- guard only the msync call with _POSIX_SYNCHRONIZED_IO rather
than also the fallback code as it breaks APT on hurd since 0.9.7.3
as the fallback is now always used on non-linux (Closes: #683354)
/* This is done in syncronous mode - the docs indicate that this will
not return till all IO is complete */
bool MMap::Sync()
/* This is done in syncronous mode - the docs indicate that this will
not return till all IO is complete */
bool MMap::Sync()
if ((Flags & UnMapped) == UnMapped)
return true;
if ((Flags & UnMapped) == UnMapped)
return true;
-
-#ifdef _POSIX_SYNCHRONIZED_IO
if ((Flags & ReadOnly) != ReadOnly)
{
if (SyncToFd != NULL)
if ((Flags & ReadOnly) != ReadOnly)
{
if (SyncToFd != NULL)
+#ifdef _POSIX_SYNCHRONIZED_IO
if (msync((char *)Base, iSize, MS_SYNC) < 0)
return _error->Errno("msync", _("Unable to synchronize mmap"));
if (msync((char *)Base, iSize, MS_SYNC) < 0)
return _error->Errno("msync", _("Unable to synchronize mmap"));
{
if ((Flags & UnMapped) == UnMapped)
return true;
{
if ((Flags & UnMapped) == UnMapped)
return true;
-
-#ifdef _POSIX_SYNCHRONIZED_IO
unsigned long long PSize = sysconf(_SC_PAGESIZE);
if ((Flags & ReadOnly) != ReadOnly)
{
unsigned long long PSize = sysconf(_SC_PAGESIZE);
if ((Flags & ReadOnly) != ReadOnly)
{
+#ifdef _POSIX_SYNCHRONIZED_IO
if (msync((char *)Base+(unsigned long long)(Start/PSize)*PSize,Stop - Start,MS_SYNC) < 0)
return _error->Errno("msync", _("Unable to synchronize mmap"));
if (msync((char *)Base+(unsigned long long)(Start/PSize)*PSize,Stop - Start,MS_SYNC) < 0)
return _error->Errno("msync", _("Unable to synchronize mmap"));
[ Program translation updates ]
* Polish (Michał Kułach)
[ Program translation updates ]
* Polish (Michał Kułach)
+ [ Pino Toscano ]
+ * apt-pkg/contrib/mmap.cc:
+ - guard only the msync call with _POSIX_SYNCHRONIZED_IO rather
+ than also the fallback code as it breaks APT on hurd since 0.9.7.3
+ as the fallback is now always used on non-linux (Closes: #683354)
+
-- David Kalnischkies <kalnischkies@gmail.com> Wed, 18 Jul 2012 11:45:57 +0200
apt (0.9.7.3) UNRELEASED; urgency=low
-- David Kalnischkies <kalnischkies@gmail.com> Wed, 18 Jul 2012 11:45:57 +0200
apt (0.9.7.3) UNRELEASED; urgency=low