summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-27 00:31:03 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-27 00:31:03 +0200
commit6a68315e938eb2611806658828ecea86805822e7 (patch)
tree5ff552cf0e6bac9a35bedaf544cb19332663fa70 /cmdline
parent75d238ba66576c04f257e9d7c0a6995721f1441d (diff)
parent01d207a5076b6fc37a064645b13f2c6550f58b94 (diff)
Merge branch 'portability/freebsd'
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-helper.cc1
-rw-r--r--cmdline/apt-key.in2
-rw-r--r--cmdline/apt-sortpkgs.cc1
3 files changed, 3 insertions, 1 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-key.in b/cmdline/apt-key.in
index 199903d61..0c10e5955 100644
--- a/cmdline/apt-key.in
+++ b/cmdline/apt-key.in
@@ -321,7 +321,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"
rm -f "$PUBRING"
touch "$PUBRING"
foreach_keyring_do 'catfile' "$PUBRING"
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>