summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-02-10 05:46:38 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-02-10 05:46:38 -0800
commitb677c4562dea82ffaf413e7e9311ca4b9c1c6ec6 (patch)
treeb6ec1a2e83d9b16163c649e5d2f1aa2dae722039
parentfe9057895e9224b764c905de470e0e38d6c5efac (diff)
downloadbinutils-gdb-b677c4562dea82ffaf413e7e9311ca4b9c1c6ec6.tar.gz
Add the missing HAVE_GETPAGESIZE check in get_view
-rw-r--r--ld/plugin.c4
1 files changed, 4 insertions, 0 deletions
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;