fixes for win32

This commit is contained in:
Andrea Fioraldi 2021-03-18 16:41:10 +01:00
parent c0b3d25ae2
commit c5d8b7fc62
2 changed files with 3 additions and 4 deletions

View File

@ -8,7 +8,6 @@ use core::{
cell::UnsafeCell,
convert::TryFrom,
fmt::{self, Display, Formatter},
mem, ptr,
ptr::write_volatile,
sync::atomic::{compiler_fence, Ordering},
};

View File

@ -455,7 +455,7 @@ pub mod shmem {
Error,
};
use core::ffi::c_void;
use core::{ptr, slice, ffi::c_void};
use uuid::Uuid;
const INVALID_HANDLE_VALUE: isize = -1;
@ -511,7 +511,7 @@ pub mod shmem {
let handle = OpenFileMappingA(
FILE_MAP_ALL_ACCESS,
BOOL(0),
PSTR(map_str_bytes as *const u8),
PSTR(map_str_bytes as *const u8 as *mut u8),
);
if handle == HANDLE(0) {
return Err(Error::Unknown(format!(
@ -549,7 +549,7 @@ pub mod shmem {
PAGE_TYPE::PAGE_READWRITE,
0,
map_size as u32,
PSTR(map_str_bytes.as_ptr()),
PSTR(map_str_bytes.as_mut()),
);
if handle == HANDLE(0) {
return Err(Error::Unknown(format!(