From: H.J. Lu Date: Tue, 10 Feb 2015 13:46:38 +0000 (-0800) Subject: Add the missing HAVE_GETPAGESIZE check in get_view X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b677c4562dea82ffaf413e7e9311ca4b9c1c6ec6;p=binutils-gdb.git Add the missing HAVE_GETPAGESIZE check in get_view --- diff --git a/ld/plugin.c b/ld/plugin.c index 325481791d6..a799ec78e61 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -529,9 +529,13 @@ get_view (const void *handle, const void **viewp) size += bias; # endif buffer = mmap (NULL, size, PROT_READ, MAP_PRIVATE, input->fd, offset); +# if HAVE_GETPAGESIZE if (buffer != MAP_FAILED) buffer += bias; else +# else + if (buffer == MAP_FAILED) +# endif #endif { char *p;