diff options
author | Andrew Walbran <qwandor@google.com> | 2020-10-23 14:31:14 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-10-23 14:31:14 +0000 |
commit | 076f7945f904b216b67c6c6b3d20359d3fe93e35 (patch) | |
tree | 3baaa60552cb80824ef47c0db18fa25cc64d2152 | |
parent | b65ed2c6d43227a568b7235668e56fe6b3869954 (diff) | |
parent | f51a36e9b188d564ae148f573140958605d9f862 (diff) | |
download | vsock-076f7945f904b216b67c6c6b3d20359d3fe93e35.tar.gz |
Use socklen_t rather than u32, as they are not always the same. am: fcaa523d01 am: 629de50b8e am: daf2ff6eb6 am: eb0f3f4e3f am: f51a36e9b1
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vsock/+/1466267
Change-Id: I31b21edf8f106d1708c939f0f2d3e3f74d7e9944
-rw-r--r-- | METADATA | 1 | ||||
-rw-r--r-- | src/lib.rs | 8 |
2 files changed, 5 insertions, 4 deletions
@@ -16,4 +16,5 @@ third_party { month: 9 day: 28 } + local_modifications: "Cherry-picked https://github.com/qwandor/vsock-rs/commit/4f73c26fc9a95e36e3ac4d304a02b6a424d7bcfd to fix Android build. This should be included in the next upstream release." } @@ -72,7 +72,7 @@ impl VsockListener { bind( socket, &mut vsock_addr as *mut _ as *mut sockaddr, - size_of::<sockaddr_vm>() as u32, + size_of::<sockaddr_vm>() as socklen_t, ) }; if res < 0 { @@ -234,7 +234,7 @@ impl VsockStream { connect( sock, &vsock_addr as *const _ as *const sockaddr, - size_of::<sockaddr_vm>() as u32, + size_of::<sockaddr_vm>() as socklen_t, ) } < 0 { @@ -320,7 +320,7 @@ impl VsockStream { SOL_SOCKET, SO_SNDTIMEO, &timeout as *const _ as *const c_void, - size_of::<timeval>() as u32, + size_of::<timeval>() as socklen_t, ) } < 0 { @@ -339,7 +339,7 @@ impl VsockStream { SOL_SOCKET, SO_RCVTIMEO, &timeout as *const _ as *const c_void, - size_of::<timeval>() as u32, + size_of::<timeval>() as socklen_t, ) } < 0 { |