From b16c26174fd625aba62ea5716e78b40d64812f3d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 10 Sep 2007 16:52:56 +0200 Subject: * apt-pkg/contrib/hashes.h: - fix anohter missing cstring include --- apt-pkg/contrib/hashes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/contrib') diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h index 93e7b25d9..264f7fe90 100644 --- a/apt-pkg/contrib/hashes.h +++ b/apt-pkg/contrib/hashes.h @@ -20,6 +20,7 @@ #include #include +#include using std::min; using std::vector; -- cgit v1.2.3 From e9fce64bd454e68641a265d384669217f2bc0558 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 27 Sep 2007 19:23:55 +0200 Subject: * apt-pkg/acquire-item.cc: - fix crash in diff acquire code * apt-pkg/contrib/mmap.cc: - don't fail if msync() returns > 0 --- apt-pkg/contrib/mmap.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/contrib') diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index 7f814c2d2..abcae46fe 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -117,7 +117,7 @@ bool MMap::Sync() #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; @@ -134,7 +134,7 @@ bool MMap::Sync(unsigned long Start,unsigned long Stop) #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; -- cgit v1.2.3