diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-05-20 10:19:08 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-05-20 10:19:08 +0200 |
commit | 5a273edf4dc53fc38495b1fbf38bc11962a74168 (patch) | |
tree | 2fdb9f59227f6300a7f191d80e201e432839681f /abuild-tar.c | |
parent | 90c75923e9637b2b65553b6e951b3ebab9d53a53 (diff) | |
download | abuild-5a273edf4dc53fc38495b1fbf38bc11962a74168.tar.gz abuild-5a273edf4dc53fc38495b1fbf38bc11962a74168.tar.bz2 abuild-5a273edf4dc53fc38495b1fbf38bc11962a74168.tar.xz abuild-5a273edf4dc53fc38495b1fbf38bc11962a74168.zip |
abuild-tar: improve portability
splice is a linux thing.
Diffstat (limited to 'abuild-tar.c')
-rw-r--r-- | abuild-tar.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/abuild-tar.c b/abuild-tar.c index 956fcc9..29b904f 100644 --- a/abuild-tar.c +++ b/abuild-tar.c @@ -162,6 +162,7 @@ static ssize_t full_write(int fd, const void *buf, size_t count) return total; } +#if defined(__linux__) static ssize_t full_splice(int from_fd, int to_fd, size_t count) { ssize_t total, n; @@ -182,6 +183,9 @@ static ssize_t full_splice(int from_fd, int to_fd, size_t count) return total; } +#else +#define full_splice(from_fd, to_fd, count) -1 +#endif #define BUF_INITIALIZER {0} struct buf { |