File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2205,6 +2205,9 @@ fn test_android(target: &str) {
22052205 // Added in API level 30, but tests use level 28.
22062206 "memfd_create" | "mlock2" | "renameat2" | "statx" | "statx_timestamp" => true ,
22072207
2208+ // Added in API level 33, but tests use level 28.
2209+ "preadv2" | "pwritev2" => true ,
2210+
22082211 // Added in glibc 2.25.
22092212 "getentropy" => true ,
22102213
Original file line number Diff line number Diff line change @@ -3276,6 +3276,16 @@ pub const AT_MINSIGSTKSZ: c_ulong = 51;
32763276pub const SI_DETHREAD : c_int = -7 ;
32773277pub const TRAP_PERF : c_int = 6 ;
32783278
3279+ // Flags for preadv2/pwritev2
3280+ pub const RWF_HIPRI : c_int = 0x00000001 ;
3281+ pub const RWF_DSYNC : c_int = 0x00000002 ;
3282+ pub const RWF_SYNC : c_int = 0x00000004 ;
3283+ pub const RWF_NOWAIT : c_int = 0x00000008 ;
3284+ pub const RWF_APPEND : c_int = 0x00000010 ;
3285+ pub const RWF_NOAPPEND : c_int = 0x00000020 ;
3286+ pub const RWF_ATOMIC : c_int = 0x00000040 ;
3287+ pub const RWF_DONTCACHE : c_int = 0x00000080 ;
3288+
32793289// Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the
32803290// following are only available on newer Linux versions than the versions
32813291// currently used in CI in some configurations, so we define them here.
@@ -3747,6 +3757,20 @@ extern "C" {
37473757 newpath : * const c_char ,
37483758 flags : c_uint ,
37493759 ) -> c_int ;
3760+ pub fn preadv2 (
3761+ fd : c_int ,
3762+ iov : * const crate :: iovec ,
3763+ iovcnt : c_int ,
3764+ offset : off_t ,
3765+ flags : c_int ,
3766+ ) -> ssize_t ;
3767+ pub fn pwritev2 (
3768+ fd : c_int ,
3769+ iov : * const crate :: iovec ,
3770+ iovcnt : c_int ,
3771+ offset : off_t ,
3772+ flags : c_int ,
3773+ ) -> ssize_t ;
37503774}
37513775
37523776cfg_if ! {
Original file line number Diff line number Diff line change @@ -1029,22 +1029,6 @@ extern "C" {
10291029 dirfd : c_int ,
10301030 path : * const c_char ,
10311031 ) -> c_int ;
1032- #[ cfg_attr( gnu_file_offset_bits64, link_name = "preadv64v2" ) ]
1033- pub fn preadv2 (
1034- fd : c_int ,
1035- iov : * const crate :: iovec ,
1036- iovcnt : c_int ,
1037- offset : off_t ,
1038- flags : c_int ,
1039- ) -> ssize_t ;
1040- #[ cfg_attr( gnu_file_offset_bits64, link_name = "pwritev64v2" ) ]
1041- pub fn pwritev2 (
1042- fd : c_int ,
1043- iov : * const crate :: iovec ,
1044- iovcnt : c_int ,
1045- offset : off_t ,
1046- flags : c_int ,
1047- ) -> ssize_t ;
10481032 pub fn preadv64v2 (
10491033 fd : c_int ,
10501034 iov : * const crate :: iovec ,
Original file line number Diff line number Diff line change @@ -4360,6 +4360,22 @@ extern "C" {
43604360 flags : c_int ,
43614361 ) -> c_int ;
43624362 pub fn open_by_handle_at ( mount_fd : c_int , handle : * mut file_handle , flags : c_int ) -> c_int ;
4363+ #[ cfg_attr( gnu_file_offset_bits64, link_name = "preadv64v2" ) ]
4364+ pub fn preadv2 (
4365+ fd : c_int ,
4366+ iov : * const crate :: iovec ,
4367+ iovcnt : c_int ,
4368+ offset : off_t ,
4369+ flags : c_int ,
4370+ ) -> ssize_t ;
4371+ #[ cfg_attr( gnu_file_offset_bits64, link_name = "pwritev64v2" ) ]
4372+ pub fn pwritev2 (
4373+ fd : c_int ,
4374+ iov : * const crate :: iovec ,
4375+ iovcnt : c_int ,
4376+ offset : off_t ,
4377+ flags : c_int ,
4378+ ) -> ssize_t ;
43634379}
43644380
43654381// LFS64 extensions
Original file line number Diff line number Diff line change @@ -780,20 +780,6 @@ extern "C" {
780780 dirfd : c_int ,
781781 path : * const c_char ,
782782 ) -> c_int ;
783- pub fn preadv2 (
784- fd : c_int ,
785- iov : * const crate :: iovec ,
786- iovcnt : c_int ,
787- offset : off_t ,
788- flags : c_int ,
789- ) -> ssize_t ;
790- pub fn pwritev2 (
791- fd : c_int ,
792- iov : * const crate :: iovec ,
793- iovcnt : c_int ,
794- offset : off_t ,
795- flags : c_int ,
796- ) -> ssize_t ;
797783 pub fn getauxval ( type_ : c_ulong ) -> c_ulong ;
798784 pub fn renameat2 (
799785 olddirfd : c_int ,
You can’t perform that action at this time.
0 commit comments