diff --git a/libc-test/build.rs b/libc-test/build.rs index 4c16024a1065f..3a5c857dda260 100755 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -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, } }); diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index 079de283f893f..fb49108056003 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -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;