diff --git a/base/fs.jl b/base/fs.jl index c44dd47272d3a7..1e9cb80b9734dc 100644 --- a/base/fs.jl +++ b/base/fs.jl @@ -171,7 +171,7 @@ function write(f::File, buf::Ptr{UInt8}, len::Integer, offset::Integer=-1) if !f.open error("file is not open") end - err = ccall(:jl_fs_write, Int32, (Int32, Ptr{UInt8}, Csize_t, Csize_t), + err = ccall(:jl_fs_write, Int32, (Int32, Ptr{UInt8}, Csize_t, Int64), f.handle, buf, len, offset) uv_error("write",err) len diff --git a/src/jl_uv.c b/src/jl_uv.c index 9d9c94dfb96a28..37615cbd156c8c 100644 --- a/src/jl_uv.c +++ b/src/jl_uv.c @@ -452,7 +452,7 @@ DLLEXPORT int jl_fs_chmod(char *path, int mode) return ret; } -DLLEXPORT int jl_fs_write(int handle, char *data, size_t len, size_t offset) +DLLEXPORT int jl_fs_write(int handle, char *data, size_t len, int64_t offset) { uv_fs_t req; uv_buf_t buf[1];