Skip to content

Commit

Permalink
Fixed build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Balabanov committed Feb 14, 2025
1 parent 4acb348 commit d888975
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions nym-vpn-core/crates/nym-vpn-account-controller/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ uuid.workspace = true
zeroize.workspace = true
windows-sys = { workspace = true, features = ["Win32_System_Threading", "Win32_System_SystemServices"] }
widestring.workspace = true
winapi = { version = "0.3" }

[build-dependencies]
sqlx = { workspace = true, features = ["runtime-tokio-rustls", "sqlite"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ use std::{
use time::OffsetDateTime;
use tracing::log::LevelFilter;
#[cfg(windows)]
use winapi::um::winnt::SECURITY_MAX_SID_SIZE;
#[cfg(windows)]
use windows_sys::Win32::Foundation::{FALSE, TRUE};
#[cfg(windows)]
use windows_sys::Win32::System::SystemServices::SECURITY_DESCRIPTOR_REVISION;

// Consider requests older than 60 days as stale
const DEFAULT_STALE_REQUESTS_MAX_AGE: Duration = Duration::from_secs(60 * 60 * 24 * 60);
const SECURITY_MAX_SID_SIZE: u32 = 68;

#[derive(Clone)]
pub(crate) struct PendingCredentialRequestsStorage {
Expand Down Expand Up @@ -217,7 +218,7 @@ fn set_file_permission_owner_rw_windows<P: AsRef<Path>>(path: P) -> Result<(), s
)
})?;

let mut sid_size = SECURITY_MAX_SID_SIZE;
let mut sid_size: u32 = SECURITY_MAX_SID_SIZE as u32;
let mut system_sid = vec![0u8; sid_size as usize];

unsafe {
Expand Down
2 changes: 1 addition & 1 deletion nym-vpn-core/crates/nym-vpn-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tracing.workspace = true
zeroize.workspace = true
windows-sys = { workspace = true, features = ["Win32_System_Threading", "Win32_System_SystemServices"] }
widestring.workspace = true
winapi = "0.3.9"
winapi = { version = "0.3" }

[dev-dependencies]
bip39 = { workspace = true, features = ["rand"] }
Expand Down
6 changes: 4 additions & 2 deletions nym-vpn-core/crates/nym-vpn-store/src/mnemonic/on_disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
// SPDX-License-Identifier: GPL-3.0-only

use super::{MnemonicStorage, MnemonicStorageError, StoredMnemonic};
#[cfg(windows)]
use std::os::raw::c_void;
#[cfg(unix)]
use std::os::unix::fs::PermissionsExt;
#[cfg(windows)]
use std::path::Path;
use std::{
fs::{self, File},
mem,
path::PathBuf,
ptr,
};
#[cfg(windows)]
use std::{mem, ptr};
#[cfg(windows)]
use widestring::U16CString;
#[cfg(windows)]
use winapi::um::winnt::SECURITY_MAX_SID_SIZE;
Expand Down

0 comments on commit d888975

Please sign in to comment.