diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index ba000c27cb..6e2c83065c 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -1053,7 +1053,7 @@ impl ControlMessageOwned { }, #[cfg(any(target_os = "linux"))] (libc::SOL_TLS, libc::TLS_GET_RECORD_TYPE) => { - let content_type = ptr::read_unaligned(p as *const u8); + let content_type = unsafe { ptr::read_unaligned(p as *const u8) }; ControlMessageOwned::TlsGetRecordType(content_type.into()) }, (_, _) => {