Skip to content

Commit

Permalink
Fix wireguard-go-rs build on non-Windows platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Jan 14, 2025
1 parent 2b9c2a3 commit dd1191b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions wireguard-go-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
//!
//! The [`Tunnel`] type provides a safe Rust wrapper around the C FFI.
use core::{
ffi::{c_char, CStr},
mem::{ManuallyDrop, MaybeUninit},
slice,
};
use core::ffi::{c_char, CStr};
use core::mem::ManuallyDrop;
#[cfg(target_os = "windows")]
use core::mem::MaybeUninit;
use core::slice;
#[cfg(target_os = "windows")]
use std::ffi::CString;
use util::OnDrop;
Expand Down Expand Up @@ -346,13 +346,15 @@ mod ffi {
pub fn wgTurnOn(
mtu: isize,
settings: *const c_char,
fd: Fd,
logging_callback: Option<LoggingCallback>,
logging_context: LoggingContext,
) -> i32;

#[cfg(target_os = "android")]
pub fn wgTurnOn(
settings: *const c_char,
fd: Fd,
logging_callback: Option<LoggingCallback>,
logging_context: LoggingContext,
) -> i32;
Expand Down

0 comments on commit dd1191b

Please sign in to comment.