Skip to content

Commit d4e4814

Browse files
committed
Haiku: change argument types for readv() and writev()
This crate's definition was recently updated to conform to the actual type definition in the header files. However, this deviates from the standard, and thus breaks building - amongst others - libstd. This reverts to the original definition. Parallel to this, there is an effort to fix the definition on Haiku. In the interim, the disparity between the definitions should not cause any issues for users that pass valid vector sizes.
1 parent 0687d24 commit d4e4814

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/unix/haiku/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,7 @@ pub const LOCK_UN: ::c_int = 0x08;
874874

875875
pub const SIGSTKSZ: ::size_t = 16384;
876876

877+
pub const IOV_MAX: ::c_int = 1024;
877878
pub const PATH_MAX: ::c_int = 1024;
878879

879880
pub const SA_NOCLDSTOP: ::c_int = 0x01;
@@ -1502,12 +1503,12 @@ extern "C" {
15021503
pub fn writev(
15031504
fd: ::c_int,
15041505
iov: *const ::iovec,
1505-
count: ::size_t,
1506+
count: ::c_int,
15061507
) -> ::ssize_t;
15071508
pub fn readv(
15081509
fd: ::c_int,
15091510
iov: *const ::iovec,
1510-
count: ::size_t,
1511+
count: ::c_int,
15111512
) -> ::ssize_t;
15121513

15131514
pub fn sendmsg(

0 commit comments

Comments
 (0)