summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-23 13:15:15 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-26 15:49:10 +0200
commit24a59c62efafbdb8387b2d3c5616b04b9fd21306 (patch)
tree9d959bcff3f1208e8cada3b7a56e5a9a5d4abd4c /cmdline
parentbb9fdfe45b1c06f87de857b6ed225b8509003976 (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.
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-helper.cc1
-rw-r--r--cmdline/apt-sortpkgs.cc1
2 files changed, 2 insertions, 0 deletions
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>