From 24a59c62efafbdb8387b2d3c5616b04b9fd21306 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 13:15:15 +0200 Subject: Add missing includes and external definitions Several modules use std::array without including the array header. Bad modules. Some modules use STDOUT_FILENO and friends, or close() without including unistd.h, where they are defined. One module also uses WIFEXITED() without including sys/wait.h. Finally, environ is not specified to be defined in unistd.h. We are required to define it ourselves according to POSIX, so let's do that. --- apt-pkg/contrib/strutl.cc | 1 + apt-pkg/deb/debindexfile.cc | 1 + apt-pkg/deb/dpkgpm.cc | 2 ++ apt-pkg/edsp/edsplistparser.cc | 2 ++ 4 files changed, 6 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 6c72859d4..e7cc1a759 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index 65bd3e6ee..c55847305 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -30,6 +30,7 @@ #include #include +#include /*}}}*/ // Sources Index /*{{{*/ diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index b0700bcc6..0ac74d479 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -61,6 +61,8 @@ #include /*}}}*/ +extern char **environ; + using namespace std; APT_PURE static string AptHistoryRequestingUser() /*{{{*/ diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc index dd8890f0e..c6fd528da 100644 --- a/apt-pkg/edsp/edsplistparser.cc +++ b/apt-pkg/edsp/edsplistparser.cc @@ -21,6 +21,8 @@ #include #include +#include + /*}}}*/ // ListParser::edspListParser - Constructor /*{{{*/ -- cgit v1.2.3