summaryrefslogtreecommitdiff
path: root/os/windows/posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/windows/posix.c')
-rwxr-xr-xos/windows/posix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/os/windows/posix.c b/os/windows/posix.c
index 9ef369e1..41bcb2d4 100755
--- a/os/windows/posix.c
+++ b/os/windows/posix.c
@@ -393,7 +393,9 @@ HANDLE fileMappings[1024];
int shmget(key_t key, size_t size, int shmflg)
{
int mapid = -1;
- HANDLE hMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, (PAGE_EXECUTE_READWRITE | SEC_RESERVE), size >> 32, size & 0xFFFFFFFF, NULL);
+ uint32_t size_low = size & 0xFFFFFFFF;
+ uint32_t size_high = ((uint64_t)size) >> 32;
+ HANDLE hMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, (PAGE_EXECUTE_READWRITE | SEC_RESERVE), size_high, size_low, NULL);
if (hMapping != NULL) {
fileMappings[nFileMappings] = hMapping;
mapid = nFileMappings;