From 7cfdf6b5b8f235cd8e063cbfc36ee7edbab34d98 Mon Sep 17 00:00:00 2001 From: varsity <54314240+vars1ty@users.noreply.github.com> Date: Wed, 13 Sep 2023 12:18:26 +0000 Subject: [PATCH] Fix compile error: Make IOV live longer (#163) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * make iov live longer * Update src/adapters/udp.rs * Update src/adapters/udp.rs * Update src/adapters/udp.rs * Update src/adapters/udp.rs * Update src/adapters/udp.rs * Update src/adapters/udp.rs * Update src/adapters/udp.rs * Update src/adapters/udp.rs * Update src/adapters/udp.rs * Update src/adapters/udp.rs * Update src/adapters/udp.rs --------- Co-authored-by: Luis Enrique Muñoz Martín --- src/adapters/udp.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/adapters/udp.rs b/src/adapters/udp.rs index 35b4695..b658e07 100644 --- a/src/adapters/udp.rs +++ b/src/adapters/udp.rs @@ -236,9 +236,10 @@ impl LocalResource { let mut control_buffer = nix::cmsg_space!(libc::sockaddr_storage); loop { + let mut iov = [io::IoSliceMut::new(&mut input_buffer)]; let result = socket::recvmsg::( self.socket.as_raw_fd(), - &mut [io::IoSliceMut::new(&mut input_buffer)], + &mut iov, Some(&mut control_buffer), MsgFlags::empty(), );