summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
authorMichael Vogt <egon@bottom>2007-10-02 13:52:22 +0200
committerMichael Vogt <egon@bottom>2007-10-02 13:52:22 +0200
commit3346b385523c596c1db7667b4874a8617718de70 (patch)
tree9bef8479ffdc2e80ae83ffdf02255aac0b0beb9d /apt-pkg/contrib
parent36fc5dca8b8eaa38a4ebd3ec52b462df44dd1b82 (diff)
parent59d5cc74ef7c6ca820ed9d26a4d829b891214edf (diff)
- fix parse error when dpkg sends unexpected data
* fix missing SetExecClose() call when the status-fd is used * debian/apt.cron.daily: - move unattended-upgrade before apt-get autoclean * fix "purge" commandline argument, closes: #133421 (thanks to Julien Danjou for the patch) * cmdline/apt-get.cc: - do not change the auto-installed information if a package is reinstalled * apt-pkg/acquire-item.cc: - fix crash in diff acquire code * cmdline/apt-mark: - Fix chmoding after have renamed the extended-states file (LP: #140019) (thanks to Laurent Bigonville) * apt-pkg/contrib/mmap.cc: - don't fail if msync() returns > 0
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/hashes.h1
-rw-r--r--apt-pkg/contrib/mmap.cc4
2 files changed, 3 insertions, 2 deletions
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 <algorithm>
#include <vector>
+#include <cstring>
using std::min;
using std::vector;
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;