summaryrefslogtreecommitdiffstats
path: root/src/apk_io.h
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-06-18 07:52:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-06-18 08:53:35 +0000
commitc51d82f8f616c2c8939b74c1d78f723ef778f0c8 (patch)
tree293162c153bdd963d6cd45fb3fc083a8f396100b /src/apk_io.h
parent01ec60f718c388f620598c39bdc0816a0dbe09ac (diff)
downloadapk-tools-c51d82f8f616c2c8939b74c1d78f723ef778f0c8.tar.bz2
apk-tools-c51d82f8f616c2c8939b74c1d78f723ef778f0c8.tar.xz
url: fix fetching from local repositories
Diffstat (limited to 'src/apk_io.h')
-rw-r--r--src/apk_io.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/apk_io.h b/src/apk_io.h
index 76165b7..c61fc6e 100644
--- a/src/apk_io.h
+++ b/src/apk_io.h
@@ -13,6 +13,7 @@
#include <sys/types.h>
#include <openssl/evp.h>
+#include <fcntl.h>
#include "apk_defines.h"
#include "apk_blob.h"
@@ -91,7 +92,7 @@ static inline struct apk_istream *apk_istream_from_fd(int fd)
}
static inline struct apk_istream *apk_istream_from_url(const char *url)
{
- return apk_istream_from_fd_url(-1, url);
+ return apk_istream_from_fd_url(AT_FDCWD, url);
}
struct apk_bstream *apk_bstream_from_istream(struct apk_istream *istream);
@@ -108,7 +109,7 @@ static inline struct apk_bstream *apk_bstream_from_fd(int fd)
static inline struct apk_bstream *apk_bstream_from_url(const char *url)
{
- return apk_bstream_from_fd_url(-1, url);
+ return apk_bstream_from_fd_url(AT_FDCWD, url);
}
struct apk_ostream *apk_ostream_to_fd(int fd);