about summary refs log tree commit diff
path: root/src/nix-daemon/nix-daemon.cc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2016-11-17T13·10-0500
committerShea Levy <shea@shealevy.com>2016-11-17T13·10-0500
commit3f4d3f8a1a178c4d7a80d20b3bac9889bac49f9c (patch)
tree45964aa4aa439353644b8d04e031487c9efd09a4 /src/nix-daemon/nix-daemon.cc
parent8bf378e9998cfbeb4303fade33fe514a4c18bf81 (diff)
nix-daemon: Fix splice faking on non-Linux
Diffstat (limited to 'src/nix-daemon/nix-daemon.cc')
-rw-r--r--src/nix-daemon/nix-daemon.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc
index c8fa81df13c8..90a7301873c4 100644
--- a/src/nix-daemon/nix-daemon.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -32,14 +32,14 @@ using namespace nix;
 
 #ifndef __linux__
 #define SPLICE_F_MOVE 0
-static ssize_t splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len, unsigned int flags)
+static ssize_t splice(int fd_in, void *off_in, int fd_out, void *off_out, size_t len, unsigned int flags)
 {
     /* We ignore most parameters, we just have them for conformance with the linux syscall */
     char buf[8192];
     auto read_count = read(fd_in, buf, sizeof(buf));
     if (read_count == -1)
         return read_count;
-    auto write_count = decltype<read_count>(0);
+    auto write_count = decltype(read_count)(0);
     while (write_count < read_count) {
         auto res = write(fd_out, buf + write_count, read_count - write_count);
         if (res == -1)