diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-08 16:18:49 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-08 16:18:49 +0000 |
commit | 71fd77c9b4b3398097c48d6c1d3be7296d670f89 (patch) | |
tree | ca77b69e8b4f032f1066c6a31847233f9db7f8e5 /gcc/config/host-solaris.c | |
parent | 313793ac30b7208dfb273ab1823bed6b0c20deb4 (diff) | |
download | gcc-71fd77c9b4b3398097c48d6c1d3be7296d670f89.tar.gz |
2008-07-08 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r137620
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@137632 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/host-solaris.c')
-rw-r--r-- | gcc/config/host-solaris.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/config/host-solaris.c b/gcc/config/host-solaris.c index 9a471b49f4c..bde01db9813 100644 --- a/gcc/config/host-solaris.c +++ b/gcc/config/host-solaris.c @@ -42,7 +42,7 @@ sol_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) if (size == 0) return -1; - addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, + addr = mmap ((caddr_t) base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, offset); /* Solaris isn't good about honoring the mmap START parameter @@ -55,18 +55,18 @@ sol_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) size_t i; if (addr != (void *) MAP_FAILED) - munmap (addr, size); + munmap ((caddr_t) addr, size); errno = 0; for (i = 0; i < size; i += page_size) - if (mincore ((char *)base + i, page_size, (void *)&one_byte) == -1 + if (mincore ((char *)base + i, page_size, (char *) &one_byte) == -1 && errno == ENOMEM) continue; /* The page is not mapped. */ else break; if (i >= size) - addr = mmap (base, size, + addr = mmap ((caddr_t) base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, offset); } |