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) {
1702
1702
"reallocarray" => true ,
1703
1703
"__system_property_wait" => true ,
1704
1704
1705
+ // Added in API level 30, but tests use level 28.
1706
+ "mlock2" => true ,
1707
+
1705
1708
_ => false ,
1706
1709
}
1707
1710
} ) ;
Original file line number Diff line number Diff line change @@ -2328,6 +2328,9 @@ pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5;
2328
2328
pub const ALG_OP_DECRYPT : :: c_int = 0 ;
2329
2329
pub const ALG_OP_ENCRYPT : :: c_int = 1 ;
2330
2330
2331
+ // sys/mman.h
2332
+ pub const MLOCK_ONFAULT : :: c_int = 0x01 ;
2333
+
2331
2334
// uapi/linux/vm_sockets.h
2332
2335
pub const VMADDR_CID_ANY : :: c_uint = 0xFFFFFFFF ;
2333
2336
pub const VMADDR_CID_HYPERVISOR : :: c_uint = 0 ;
@@ -2582,6 +2585,7 @@ extern "C" {
2582
2585
pub fn strerror_r ( errnum : :: c_int , buf : * mut c_char , buflen : :: size_t ) -> :: c_int ;
2583
2586
2584
2587
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 ;
2585
2589
pub fn madvise ( addr : * mut :: c_void , len : :: size_t , advice : :: c_int ) -> :: c_int ;
2586
2590
pub fn ioctl ( fd : :: c_int , request : :: c_int , ...) -> :: c_int ;
2587
2591
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;
2583
2583
2584
2584
// include/uapi/asm-generic/mman-common.h
2585
2585
pub const MAP_FIXED_NOREPLACE : :: c_int = 0x100000 ;
2586
+ pub const MLOCK_ONFAULT : :: c_uint = 0x01 ;
2586
2587
2587
2588
// uapi/linux/vm_sockets.h
2588
2589
pub const VMADDR_CID_ANY : :: c_uint = 0xFFFFFFFF ;
@@ -3533,6 +3534,7 @@ extern "C" {
3533
3534
pub fn seekdir ( dirp : * mut :: DIR , loc : :: c_long ) ;
3534
3535
3535
3536
pub fn telldir ( dirp : * mut :: DIR ) -> :: c_long ;
3537
+ pub fn mlock2 ( addr : * const :: c_void , len : :: size_t , flags : :: c_uint ) -> :: c_int ;
3536
3538
pub fn madvise ( addr : * mut :: c_void , len : :: size_t , advice : :: c_int ) -> :: c_int ;
3537
3539
3538
3540
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