summaryrefslogtreecommitdiff
path: root/apt-inst
diff options
context:
space:
mode:
Diffstat (limited to 'apt-inst')
-rw-r--r--apt-inst/contrib/extracttar.cc2
-rw-r--r--apt-inst/contrib/extracttar.h4
-rw-r--r--apt-inst/deb/dpkgdb.cc2
3 files changed, 6 insertions, 2 deletions
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc
index 2585986d7..d6da802fe 100644
--- a/apt-inst/contrib/extracttar.cc
+++ b/apt-inst/contrib/extracttar.cc
@@ -309,7 +309,7 @@ bool ExtractTar::Go(pkgDirStream &Stream)
while (Size != 0)
{
unsigned char Junk[32*1024];
- unsigned long Read = MIN(Size,sizeof(Junk));
+ unsigned long Read = min(Size,(unsigned long)sizeof(Junk));
if (InFd.Read(Junk,((Read+511)/512)*512) == false)
return false;
diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h
index ec930ca22..6daf00a27 100644
--- a/apt-inst/contrib/extracttar.h
+++ b/apt-inst/contrib/extracttar.h
@@ -21,6 +21,10 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/dirstream.h>
+#include <algorithm>
+
+using std::min;
+
class ExtractTar
{
protected:
diff --git a/apt-inst/deb/dpkgdb.cc b/apt-inst/deb/dpkgdb.cc
index 428d91303..c6a0e80e6 100644
--- a/apt-inst/deb/dpkgdb.cc
+++ b/apt-inst/deb/dpkgdb.cc
@@ -67,7 +67,7 @@ static bool EraseDir(const char *Dir)
if (Pid == 0)
{
execlp(_config->Find("Dir::Bin::rm","/bin/rm").c_str(),
- "rm","-rf","--",Dir,0);
+ "rm","-rf","--",Dir,(char *)NULL);
_exit(100);
}
return ExecWait(Pid,_config->Find("dir::bin::rm","/bin/rm").c_str());