Skip to content

Commit e93797a

Browse files
linux: add VMADDR_CID_LOCAL
In Linux we replaced VMADDR_CID_RESERVED with VMADDR_CID_LOCAL in commit ef343b35d46667668a099655fca4a5b2e43a5dfe. It is available since Linux v5.6, and it can be used to do local communication if supported. This patch deprecates VMADDR_CID_RESERVED for backward compatibility. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
1 parent f3bc836 commit e93797a

File tree

1 file changed

+6
-0
lines changed
  • src/unix/linux_like/linux

1 file changed

+6
-0
lines changed

src/unix/linux_like/linux/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,7 +2355,13 @@ pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000;
23552355
// uapi/linux/vm_sockets.h
23562356
pub const VMADDR_CID_ANY: ::c_uint = 0xFFFFFFFF;
23572357
pub const VMADDR_CID_HYPERVISOR: ::c_uint = 0;
2358+
#[deprecated(
2359+
since = "0.2.74",
2360+
note = "VMADDR_CID_RESERVED is removed since Linux v5.6 and \
2361+
replaced with VMADDR_CID_LOCAL"
2362+
)]
23582363
pub const VMADDR_CID_RESERVED: ::c_uint = 1;
2364+
pub const VMADDR_CID_LOCAL: ::c_uint = 1;
23592365
pub const VMADDR_CID_HOST: ::c_uint = 2;
23602366
pub const VMADDR_PORT_ANY: ::c_uint = 0xFFFFFFFF;
23612367

0 commit comments

Comments
 (0)