Skip to content
This repository has been archived by the owner on Aug 4, 2024. It is now read-only.

Commit

Permalink
fixup: libc-rs: correct sendfile stub prototype (#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Ookiineko <[email protected]>
  • Loading branch information
Ookiineko committed Nov 22, 2023
1 parent 20a2ccd commit 8d1f31d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/libc-compat-rs/cygwin/stubs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extern "C" {
out_fd: crate::c_int,
in_fd: crate::c_int,
count: crate::size_t
) -> crate::ssize_t;
);
}

f! {
Expand All @@ -28,7 +28,8 @@ f! {
count: crate::size_t
) -> crate::ssize_t {
if offset.is_null() {
real_sendfile(out_fd, in_fd, count)
real_sendfile(out_fd, in_fd, count);
0
else {
panic!("unreachable code")
}
Expand Down
5 changes: 3 additions & 2 deletions src/libc-compat-rs/darwin/defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extern "C" {
out_fd: crate::c_int,
in_fd: crate::c_int,
count: crate::size_t
) -> crate::ssize_t;
);
}

f! {
Expand All @@ -19,7 +19,8 @@ f! {
count: crate::size_t
) -> crate::ssize_t {
if offset.is_null() {
real_sendfile(out_fd, in_fd, count)
real_sendfile(out_fd, in_fd, count);
0
} else {
panic!("unreachable code")
}
Expand Down
5 changes: 3 additions & 2 deletions src/libc-compat-rs/windows/stubs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ extern "C" {
out_fd: crate::c_int,
in_fd: crate::c_int,
count: crate::size_t
) -> crate::ssize_t;
);
}

f! {
Expand All @@ -237,7 +237,8 @@ f! {
count: crate::size_t
) -> crate::ssize_t {
if offset.is_null() {
real_sendfile(out_fd, in_fd, count)
real_sendfile(out_fd, in_fd, count);
0
} else {
panic!("unreadable code")
}
Expand Down

0 comments on commit 8d1f31d

Please sign in to comment.