diff --git a/src/capture/activated/mod.rs b/src/capture/activated/mod.rs index 1af843a9..9375a973 100644 --- a/src/capture/activated/mod.rs +++ b/src/capture/activated/mod.rs @@ -459,7 +459,8 @@ mod testmod { pub struct NextExContext(raw::__pcap_next_ex::Context); pub fn next_ex_expect(pcap: *mut raw::pcap_t) -> NextExContext { let data_ptr: *const libc::c_uchar = DATA.as_ptr(); - let pkthdr_ptr: *mut raw::pcap_pkthdr = std::ptr::addr_of_mut!(PKTHDR); + #[allow(unused_unsafe)] // unsafe still needed to compile on MSRV + let pkthdr_ptr: *mut raw::pcap_pkthdr = unsafe { std::ptr::addr_of_mut!(PKTHDR) }; let ctx = raw::pcap_next_ex_context(); ctx.checkpoint();