diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-05 19:36:35 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-05 19:36:35 +0000 |
commit | 6fb06f334a026a58096aa27f3d96b61231e74407 (patch) | |
tree | 247adce89fe8d793750dc0212b25554d0032e658 /src/common/compat.c | |
parent | af03faa1a64d35704893926adfca13e22840a2c7 (diff) | |
download | tor-6fb06f334a026a58096aa27f3d96b61231e74407.tar.gz tor-6fb06f334a026a58096aa27f3d96b61231e74407.zip |
Try to fix windows mmap code.
svn:r17493
Diffstat (limited to 'src/common/compat.c')
-rw-r--r-- | src/common/compat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index c7713901d6..957629021e 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -178,7 +178,7 @@ tor_munmap_file(tor_mmap_t *handle) tor_mmap_t * tor_mmap_file(const char *filename) { - tor_mmap_t *res = tor_malloc_zero(sizeof(win_mmap_t)); + tor_mmap_t *res = tor_malloc_zero(sizeof(tor_mmap_t)); int empty = 0; res->file_handle = INVALID_HANDLE_VALUE; res->mmap_handle = NULL; @@ -209,7 +209,7 @@ tor_mmap_file(const char *filename) #else 0, #endif - (res->base.size & 0xfffffffful), + (res->size & 0xfffffffful), NULL); if (res->mmap_handle == NULL) goto win_err; @@ -247,9 +247,9 @@ tor_munmap_file(tor_mmap_t *handle) UnmapViewOfFile( (LPVOID) handle->data); if (handle->mmap_handle != NULL) - CloseHandle(h->mmap_handle); + CloseHandle(handle->mmap_handle); if (handle->file_handle != INVALID_HANDLE_VALUE) - CloseHandle(h->file_handle); + CloseHandle(handle->file_handle); tor_free(handle); } #else |