File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1702,6 +1702,9 @@ fn test_android(target: &str) {
17021702 "reallocarray" => true ,
17031703 "__system_property_wait" => true ,
17041704
1705+ // Added in API level 30, but tests use level 28.
1706+ "mlock2" => true ,
1707+
17051708 _ => false ,
17061709 }
17071710 } ) ;
Original file line number Diff line number Diff line change @@ -2328,6 +2328,9 @@ pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5;
23282328pub const ALG_OP_DECRYPT : :: c_int = 0 ;
23292329pub const ALG_OP_ENCRYPT : :: c_int = 1 ;
23302330
2331+ // sys/mman.h
2332+ pub const MLOCK_ONFAULT : :: c_int = 0x01 ;
2333+
23312334// uapi/linux/vm_sockets.h
23322335pub const VMADDR_CID_ANY : :: c_uint = 0xFFFFFFFF ;
23332336pub const VMADDR_CID_HYPERVISOR : :: c_uint = 0 ;
@@ -2582,6 +2585,7 @@ extern "C" {
25822585 pub fn strerror_r ( errnum : :: c_int , buf : * mut c_char , buflen : :: size_t ) -> :: c_int ;
25832586
25842587 pub fn gettimeofday ( tp : * mut :: timeval , tz : * mut :: timezone ) -> :: c_int ;
2588+ pub fn mlock2 ( addr : * const :: c_void , len : :: size_t , flags : :: c_int ) -> :: c_int ;
25852589 pub fn madvise ( addr : * mut :: c_void , len : :: size_t , advice : :: c_int ) -> :: c_int ;
25862590 pub fn ioctl ( fd : :: c_int , request : :: c_int , ...) -> :: c_int ;
25872591 pub fn msync ( addr : * mut :: c_void , len : :: size_t , flags : :: c_int ) -> :: c_int ;
Original file line number Diff line number Diff line change @@ -2583,6 +2583,7 @@ pub const MAP_SHARED_VALIDATE: ::c_int = 0x3;
25832583
25842584// include/uapi/asm-generic/mman-common.h
25852585pub const MAP_FIXED_NOREPLACE : :: c_int = 0x100000 ;
2586+ pub const MLOCK_ONFAULT : :: c_uint = 0x01 ;
25862587
25872588// uapi/linux/vm_sockets.h
25882589pub const VMADDR_CID_ANY : :: c_uint = 0xFFFFFFFF ;
@@ -3533,6 +3534,7 @@ extern "C" {
35333534 pub fn seekdir ( dirp : * mut :: DIR , loc : :: c_long ) ;
35343535
35353536 pub fn telldir ( dirp : * mut :: DIR ) -> :: c_long ;
3537+ pub fn mlock2 ( addr : * const :: c_void , len : :: size_t , flags : :: c_uint ) -> :: c_int ;
35363538 pub fn madvise ( addr : * mut :: c_void , len : :: size_t , advice : :: c_int ) -> :: c_int ;
35373539
35383540 pub fn msync ( addr : * mut :: c_void , len : :: size_t , flags : :: c_int ) -> :: c_int ;
You can’t perform that action at this time.
0 commit comments