summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSebastian Holmin <sebastian.holmin@mullvad.net>2025-02-07 16:21:36 +0100
committerSebastian Holmin <sebastian.holmin@mullvad.net>2025-02-12 10:15:15 +0100
commit29363ae5ca49b1e7390db6055492b01ae468fb1c (patch)
treef5571f0214043f6fa0a4e8d38c09a868a3a05340
parent504a1e97a8d80c603c7d3c6fea5a4409f262f9e9 (diff)
downloadmullvadvpn-29363ae5ca49b1e7390db6055492b01ae468fb1c.tar.xz
mullvadvpn-29363ae5ca49b1e7390db6055492b01ae468fb1c.zip
Make extern block unsafe
-rw-r--r--wireguard-go-rs/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/wireguard-go-rs/src/lib.rs b/wireguard-go-rs/src/lib.rs
index f49c4d4e52..75d4de02c5 100644
--- a/wireguard-go-rs/src/lib.rs
+++ b/wireguard-go-rs/src/lib.rs
@@ -6,7 +6,7 @@
//!
//! The [`Tunnel`] type provides a safe Rust wrapper around the C FFI.
-use core::ffi::{c_char, CStr};
+use core::ffi::{CStr, c_char};
use core::mem::ManuallyDrop;
#[cfg(target_os = "windows")]
use core::mem::MaybeUninit;
@@ -336,7 +336,7 @@ mod ffi {
use super::{LoggingCallback, LoggingContext};
use core::ffi::{c_char, c_void};
- extern "C" {
+ unsafe extern "C" {
/// Creates a new wireguard tunnel, uses the specific interface name, and file descriptors
/// for the tunnel device and logging. For targets other than android, this also takes an
/// MTU value.