aboutsummaryrefslogtreecommitdiff
path: root/ld/plugin.c
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 /ld/plugin.c
parentfe9057895e9224b764c905de470e0e38d6c5efac (diff)
downloadgdb-b677c4562dea82ffaf413e7e9311ca4b9c1c6ec6.zip
gdb-b677c4562dea82ffaf413e7e9311ca4b9c1c6ec6.tar.gz
gdb-b677c4562dea82ffaf413e7e9311ca4b9c1c6ec6.tar.bz2
Add the missing HAVE_GETPAGESIZE check in get_view
Diffstat (limited to 'ld/plugin.c')
-rw-r--r--ld/plugin.c4
1 files changed, 4 insertions, 0 deletions
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;