fixes for win32
This commit is contained in:
parent
c0b3d25ae2
commit
c5d8b7fc62
@ -8,7 +8,6 @@ use core::{
|
|||||||
cell::UnsafeCell,
|
cell::UnsafeCell,
|
||||||
convert::TryFrom,
|
convert::TryFrom,
|
||||||
fmt::{self, Display, Formatter},
|
fmt::{self, Display, Formatter},
|
||||||
mem, ptr,
|
|
||||||
ptr::write_volatile,
|
ptr::write_volatile,
|
||||||
sync::atomic::{compiler_fence, Ordering},
|
sync::atomic::{compiler_fence, Ordering},
|
||||||
};
|
};
|
||||||
|
@ -455,7 +455,7 @@ pub mod shmem {
|
|||||||
Error,
|
Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
use core::ffi::c_void;
|
use core::{ptr, slice, ffi::c_void};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
const INVALID_HANDLE_VALUE: isize = -1;
|
const INVALID_HANDLE_VALUE: isize = -1;
|
||||||
@ -511,7 +511,7 @@ pub mod shmem {
|
|||||||
let handle = OpenFileMappingA(
|
let handle = OpenFileMappingA(
|
||||||
FILE_MAP_ALL_ACCESS,
|
FILE_MAP_ALL_ACCESS,
|
||||||
BOOL(0),
|
BOOL(0),
|
||||||
PSTR(map_str_bytes as *const u8),
|
PSTR(map_str_bytes as *const u8 as *mut u8),
|
||||||
);
|
);
|
||||||
if handle == HANDLE(0) {
|
if handle == HANDLE(0) {
|
||||||
return Err(Error::Unknown(format!(
|
return Err(Error::Unknown(format!(
|
||||||
@ -549,7 +549,7 @@ pub mod shmem {
|
|||||||
PAGE_TYPE::PAGE_READWRITE,
|
PAGE_TYPE::PAGE_READWRITE,
|
||||||
0,
|
0,
|
||||||
map_size as u32,
|
map_size as u32,
|
||||||
PSTR(map_str_bytes.as_ptr()),
|
PSTR(map_str_bytes.as_mut()),
|
||||||
);
|
);
|
||||||
if handle == HANDLE(0) {
|
if handle == HANDLE(0) {
|
||||||
return Err(Error::Unknown(format!(
|
return Err(Error::Unknown(format!(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user