This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Add the missing HAVE_GETPAGESIZE check in get_view
- From: H.J.Lu <hjl at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 10 Feb 2015 13:47:26 -0000
- Subject: [binutils-gdb] Add the missing HAVE_GETPAGESIZE check in get_view
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b677c4562dea82ffaf413e7e9311ca4b9c1c6ec6
commit b677c4562dea82ffaf413e7e9311ca4b9c1c6ec6
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Feb 10 05:46:38 2015 -0800
Add the missing HAVE_GETPAGESIZE check in get_view
Diff:
---
ld/plugin.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ld/plugin.c b/ld/plugin.c
index 3254817..a799ec7 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;