Skip to content

Commit

Permalink
Fixed: Broken Windows Build
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Sep 9, 2023
1 parent b715d83 commit 6eaf5a5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src-rust/src/internal/locator_header_finder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ use crate::structs::internal::LocatorHeader;
use crate::utilities::cached::CACHED;
use core::mem;
use lazy_static::lazy_static;
use mmap_rs::{MmapOptions, UnsafeMmapFlags};
use std::ptr::null_mut;
use std::sync::Mutex;

#[cfg(unix)]
use {
super::memory_mapped_file_unix::BASE_DIR,
crate::internal::memory_mapped_file_unix::UnixMemoryMappedFile, errno::errno, libc::kill,
std::fs, std::path::Path,
crate::internal::memory_mapped_file_unix::UnixMemoryMappedFile,
errno::errno,
libc::kill,
mmap_rs::{MmapOptions, UnsafeMmapFlags},
std::fs,
std::path::Path,
};

#[cfg(target_os = "windows")]
Expand Down Expand Up @@ -155,6 +158,7 @@ unsafe fn init_locatorheader_standard() -> *mut LocatorHeader {
LOCATOR_HEADER_ADDRESS
}

#[cfg(not(target_os = "windows"))]
unsafe fn init_locatorheader_memorymappedfiles_unsupported() -> *mut LocatorHeader {
let mmap = MmapOptions::new(MmapOptions::allocation_granularity())
.unwrap()
Expand Down

0 comments on commit 6eaf5a5

Please sign in to comment.