Some bug fixes for Windows (#7374)

* Fix MAP_SHARED check in sys/mman.h

* Fix missing :platform_shims dependency for ray_util

* dlmalloc patch for Arrow
This commit is contained in:
mehrdadn
2020-02-28 10:22:32 -08:00
committed by GitHub
parent 0efaa9b310
commit 5fb5be0ba5
4 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ EXTERN_C WINBASEAPI void *WINAPI MapViewOfFile(HANDLE hFileMappingObject,
EXTERN_C WINBASEAPI BOOL WINAPI UnmapViewOfFile(void const *lpBaseAddress);
static void *mmap(void *addr, size_t len, int prot, int flags, int fd, off_t off) {
void *result = (void *)(-1);
if (!addr && prot == MAP_SHARED) {
if (!addr && (flags & MAP_SHARED)) {
/* HACK: we're assuming handle sizes can't exceed 32 bits, which is wrong...
* but works for now. */
void *ptr = MapViewOfFile((HANDLE)(intptr_t)fd, FILE_MAP_ALL_ACCESS,