Skip to content

Commit 01f62b6

Browse files
committed
preadv2/pwritev2: Only define these functions with glibc
They're not implemented by musl or bionic.
1 parent a18aee2 commit 01f62b6

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,6 +1420,20 @@ extern "C" {
14201420
dirfd: ::c_int,
14211421
path: *const ::c_char,
14221422
) -> ::c_int;
1423+
pub fn preadv2(
1424+
fd: ::c_int,
1425+
iov: *const ::iovec,
1426+
iovcnt: ::c_int,
1427+
offset: ::off_t,
1428+
flags: ::c_int,
1429+
) -> ::ssize_t;
1430+
pub fn pwritev2(
1431+
fd: ::c_int,
1432+
iov: *const ::iovec,
1433+
iovcnt: ::c_int,
1434+
offset: ::off_t,
1435+
flags: ::c_int,
1436+
) -> ::ssize_t;
14231437
}
14241438

14251439
extern "C" {

src/unix/linux_like/linux/mod.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,26 +3033,12 @@ extern "C" {
30333033
iovcnt: ::c_int,
30343034
offset: ::off_t,
30353035
) -> ::ssize_t;
3036-
pub fn pwritev2(
3037-
fd: ::c_int,
3038-
iov: *const ::iovec,
3039-
iovcnt: ::c_int,
3040-
offset: ::off_t,
3041-
flags: ::c_int,
3042-
) -> ::ssize_t;
30433036
pub fn preadv(
30443037
fd: ::c_int,
30453038
iov: *const ::iovec,
30463039
iovcnt: ::c_int,
30473040
offset: ::off_t,
30483041
) -> ::ssize_t;
3049-
pub fn preadv2(
3050-
fd: ::c_int,
3051-
iov: *const ::iovec,
3052-
iovcnt: ::c_int,
3053-
offset: ::off_t,
3054-
flags: ::c_int,
3055-
) -> ::ssize_t;
30563042
pub fn quotactl(
30573043
cmd: ::c_int,
30583044
special: *const ::c_char,

0 commit comments

Comments
 (0)