diff options
author | Julian Andres Klode <jak@debian.org> | 2016-08-23 13:15:15 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-08-26 15:49:10 +0200 |
commit | 24a59c62efafbdb8387b2d3c5616b04b9fd21306 (patch) | |
tree | 9d959bcff3f1208e8cada3b7a56e5a9a5d4abd4c | |
parent | bb9fdfe45b1c06f87de857b6ed225b8509003976 (diff) |
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.
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 1 | ||||
-rw-r--r-- | apt-pkg/deb/debindexfile.cc | 1 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 2 | ||||
-rw-r--r-- | apt-pkg/edsp/edsplistparser.cc | 2 | ||||
-rw-r--r-- | apt-private/private-show.cc | 1 | ||||
-rw-r--r-- | cmdline/apt-helper.cc | 1 | ||||
-rw-r--r-- | cmdline/apt-sortpkgs.cc | 1 | ||||
-rw-r--r-- | test/interactive-helper/test_fileutl.cc | 1 |
8 files changed, 10 insertions, 0 deletions
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 <apt-pkg/fileutl.h> #include <apt-pkg/error.h> +#include <array> #include <algorithm> #include <iomanip> #include <locale> 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 <sstream> #include <sys/stat.h> +#include <unistd.h> /*}}}*/ // 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 <apti18n.h> /*}}}*/ +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 <apt-pkg/fileutl.h> #include <apt-pkg/pkgsystem.h> +#include <array> + /*}}}*/ // ListParser::edspListParser - Constructor /*{{{*/ diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc index 03229476e..27338a08c 100644 --- a/apt-private/private-show.cc +++ b/apt-private/private-show.cc @@ -24,6 +24,7 @@ #include <apt-private/private-show.h> #include <stdio.h> +#include <unistd.h> #include <ostream> #include <string> diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc index fd99fba8b..a6f88ad06 100644 --- a/cmdline/apt-helper.cc +++ b/cmdline/apt-helper.cc @@ -29,6 +29,7 @@ #include <string> #include <vector> +#include <unistd.h> #include <stdlib.h> #include <apti18n.h> diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index b80bbedd6..cf19b84ec 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -29,6 +29,7 @@ #include <vector> #include <algorithm> #include <stdio.h> +#include <unistd.h> #include <iostream> #include <string> #include <memory> diff --git a/test/interactive-helper/test_fileutl.cc b/test/interactive-helper/test_fileutl.cc index e660c2981..7c4b95759 100644 --- a/test/interactive-helper/test_fileutl.cc +++ b/test/interactive-helper/test_fileutl.cc @@ -4,6 +4,7 @@ #include <sys/types.h> #include <sys/stat.h> +#include <sys/wait.h> #include <unistd.h> #include <stdlib.h> #include <fcntl.h> |