# std: implement sendfile on linux · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/bd287dd1942f0a72e6bd9dc8475bd4e7d34fa5f8)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: bd287dd1942f0a72e6bd9dc8475bd4e7d34fa5f8

Requested commit: bd287dd1942f0a72e6bd9dc8475bd4e7d34fa5f8

Commit: bd287dd1942f0a72e6bd9dc8475bd4e7d34fa5f8

Tree: 7288fbd6c28ee5b67e880f2bf7f4c0bc2f269377

Author: Terin Stock

Committer: Andrew Kelley

## Message

```
std: implement sendfile on linux

This changset adds a `sendfile(2)` syscall bindings to the linux bits
component. Where available, the `sendfile64(2)` syscall will be
transparently called.

A wrapping function has also been added to the std.os to transform
errno returns to Zig errors.

Change-Id: I86769fc4382c0771e3656e7b21137bafd99a4411

```

## Parents

- [00be934569d25e3b041091ff63a4cf6c456d1403](https://git.cafe/gitcafe/zig/commit/00be934569d25e3b041091ff63a4cf6c456d1403?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/bd287dd1942f0a72e6bd9dc8475bd4e7d34fa5f8?format=markdown)
