Skip to content

Commit 34217e0

Browse files
author
Gleb Pomykalov
committed
add compatibility with older rust versions
1 parent 13ae5e4 commit 34217e0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/sys/socket/sockopt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ unsafe impl<T> Get<T> for GetStruct<T> {
373373
}
374374

375375
/// Setter for bytes.
376-
struct SetBytes<'a, T> where T: AsRef<[u8]> {
376+
struct SetBytes<'a, T> where T: 'a + AsRef<[u8]> {
377377
ptr: &'a T,
378378
}
379379

test/sys/test_socket.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ pub fn test_scm_rights() {
189189
#[cfg(any(target_os = "linux", target_os= "android"))]
190190
#[test]
191191
pub fn test_af_alg_cmsg() {
192+
use libc;
192193
use nix::sys::uio::IoVec;
193194
use nix::unistd::read;
194195
use nix::sys::socket::{socket, sendmsg, bind, accept, setsockopt,

0 commit comments

Comments
 (0)