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. --- cmdline/apt-helper.cc | 1 + cmdline/apt-sortpkgs.cc | 1 + 2 files changed, 2 insertions(+) (limited to 'cmdline') 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 #include +#include #include #include 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 #include #include +#include #include #include #include -- cgit v1.2.3 From dd7758b9245275a31fde70218db9a531c5859c26 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 21:01:06 +0200 Subject: apt-key: Only use readlink -f for existing components On FreeBSD, readlink -f requires the last component to exist. --- cmdline/apt-key.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in index 81314c7f5..21df37ffd 100644 --- a/cmdline/apt-key.in +++ b/cmdline/apt-key.in @@ -306,7 +306,7 @@ merge_all_trusted_keyrings_into_pubring() { # does the same as: # foreach_keyring_do 'import_keys_from_keyring' "${GPGHOMEDIR}/pubring.gpg" # but without using gpg, just cat and find - local PUBRING="$(readlink -f "${GPGHOMEDIR}/pubring.gpg")" + local PUBRING="$(readlink -f "${GPGHOMEDIR}")/pubring.gpg" # if a --keyring was given, just use this one if [ -n "$FORCED_KEYRING" ]; then if [ -s "$FORCED_KEYRING" ]; then -- cgit v1.2.3