From 5a273edf4dc53fc38495b1fbf38bc11962a74168 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 20 May 2016 10:19:08 +0200 Subject: abuild-tar: improve portability splice is a linux thing. --- abuild-tar.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'abuild-tar.c') 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 { -- cgit v1.2.3-60-g2f50