]> git.saurik.com Git - apt.git/commitdiff
Add missing includes and external definitions
authorJulian Andres Klode <jak@debian.org>
Tue, 23 Aug 2016 11:15:15 +0000 (13:15 +0200)
committerJulian Andres Klode <jak@debian.org>
Fri, 26 Aug 2016 13:49:10 +0000 (15:49 +0200)
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
apt-pkg/deb/debindexfile.cc
apt-pkg/deb/dpkgpm.cc
apt-pkg/edsp/edsplistparser.cc
apt-private/private-show.cc
cmdline/apt-helper.cc
cmdline/apt-sortpkgs.cc
test/interactive-helper/test_fileutl.cc

index 6c72859d4295dba704c3778d78765acc0f280654..e7cc1a7592081143b30484afc899be7f52793a97 100644 (file)
@@ -21,6 +21,7 @@
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/error.h>
 
+#include <array>
 #include <algorithm>
 #include <iomanip>
 #include <locale>
index 65bd3e6eefd6320614b1ac133ba426bad40d31b7..c55847305ff96c4038c64eae425a6b173f0d28e2 100644 (file)
@@ -30,6 +30,7 @@
 #include <sstream>
 
 #include <sys/stat.h>
+#include <unistd.h>
                                                                        /*}}}*/
 
 // Sources Index                                                       /*{{{*/
index b0700bcc6cea4cfc54524a2cca525cb456c3e85f..0ac74d4792a770c6ba624834d3393636a0fc77bc 100644 (file)
@@ -61,6 +61,8 @@
 #include <apti18n.h>
                                                                        /*}}}*/
 
+extern char **environ;
+
 using namespace std;
 
 APT_PURE static string AptHistoryRequestingUser()                      /*{{{*/
index dd8890f0e52d40dcad180974ee52a9632f0e95a3..c6fd528da1b54ef3f04b76b07a91b16189707a2a 100644 (file)
@@ -21,6 +21,8 @@
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/pkgsystem.h>
 
+#include <array>
+
                                                                        /*}}}*/
 
 // ListParser::edspListParser - Constructor                            /*{{{*/
index 03229476ec9a352c68376bcb9371d8e56cbcc817..27338a08c8ef40de50800da6629f1ef95f703962 100644 (file)
@@ -24,6 +24,7 @@
 #include <apt-private/private-show.h>
 
 #include <stdio.h>
+#include <unistd.h>
 #include <ostream>
 #include <string>
 
index fd99fba8bb868ee87201c343cd0a1f59709e1ed2..a6f88ad06c6c25c35502de2c647f379d96f54ea5 100644 (file)
@@ -29,6 +29,7 @@
 #include <string>
 #include <vector>
 
+#include <unistd.h>
 #include <stdlib.h>
 
 #include <apti18n.h>
index b80bbedd6d93e39c4205c5b6e1b28b5680c7c925..cf19b84ec4f1f89d140bf0903ae6700653e64be6 100644 (file)
@@ -29,6 +29,7 @@
 #include <vector>
 #include <algorithm>
 #include <stdio.h>
+#include <unistd.h>
 #include <iostream>
 #include <string>
 #include <memory>
index e660c298190ab4b8880237c8099b7e014bc30f05..7c4b957593c890835f459d74dc27201aefb671bb 100644 (file)
@@ -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>