diff --git a/lib/file/preallocate_windows.go b/lib/file/preallocate_windows.go index f238c5c73..f92f9f7f7 100644 --- a/lib/file/preallocate_windows.go +++ b/lib/file/preallocate_windows.go @@ -92,7 +92,8 @@ const SetSparseImplemented = true // SetSparse makes the file be a sparse file func SetSparse(out *os.File) error { - err := syscall.DeviceIoControl(syscall.Handle(out.Fd()), FSCTL_SET_SPARSE, nil, 0, nil, 0, nil, nil) + var bytesReturned uint32 + err := syscall.DeviceIoControl(syscall.Handle(out.Fd()), FSCTL_SET_SPARSE, nil, 0, nil, 0, &bytesReturned, nil) if err != nil { return errors.Wrap(err, "DeviceIoControl FSCTL_SET_SPARSE") }