Android: Add VMADDR_ constants.

This commit is contained in:
Andrew Walbran 2020-10-06 15:26:09 +01:00
parent 1818abfb31
commit 4f40b35cca
2 changed files with 10 additions and 0 deletions

View File

@ -1562,6 +1562,9 @@ fn test_android(target: &str) {
// Needs a newer Android SDK for the definition
"P_PIDFD" => true,
// Requires Linux kernel 5.6
"VMADDR_CID_LOCAL" => true,
_ => false,
}
});

View File

@ -2129,6 +2129,13 @@ pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5;
pub const ALG_OP_DECRYPT: ::c_int = 0;
pub const ALG_OP_ENCRYPT: ::c_int = 1;
// uapi/linux/vm_sockets.h
pub const VMADDR_CID_ANY: ::c_uint = 0xFFFFFFFF;
pub const VMADDR_CID_HYPERVISOR: ::c_uint = 0;
pub const VMADDR_CID_LOCAL: ::c_uint = 1;
pub const VMADDR_CID_HOST: ::c_uint = 2;
pub const VMADDR_PORT_ANY: ::c_uint = 0xFFFFFFFF;
// uapi/linux/inotify.h
pub const IN_ACCESS: u32 = 0x0000_0001;
pub const IN_MODIFY: u32 = 0x0000_0002;