mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-09 02:29:07 +08:00
Cygwin: AF_UNIX: reopen_shmem: fix view size
Use sizeof (af_unix_shmem_t) as the view size, as when the shared memory was created. Previously PAGESIZE was used, causing NtMapViewOfSection to fail with STATUS_INVALID_VIEW_SIZE.
This commit is contained in:
parent
7992fc068d
commit
6b08c5e15d
@ -233,11 +233,11 @@ int
|
||||
fhandler_socket_unix::reopen_shmem ()
|
||||
{
|
||||
NTSTATUS status;
|
||||
SIZE_T viewsize = PAGESIZE;
|
||||
SIZE_T viewsize = sizeof (af_unix_shmem_t);
|
||||
PVOID addr = NULL;
|
||||
|
||||
status = NtMapViewOfSection (shmem_handle, NtCurrentProcess (), &addr, 0,
|
||||
PAGESIZE, NULL, &viewsize, ViewShare, 0,
|
||||
viewsize, NULL, &viewsize, ViewShare, 0,
|
||||
PAGE_READWRITE);
|
||||
if (!NT_SUCCESS (status))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user