aboutsummaryrefslogtreecommitdiff
path: root/gdb/minidebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/minidebug.c')
-rw-r--r--gdb/minidebug.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/minidebug.c b/gdb/minidebug.c
index d38fc64..4323294 100644
--- a/gdb/minidebug.c
+++ b/gdb/minidebug.c
@@ -22,6 +22,7 @@
#include "symfile.h"
#include "objfiles.h"
#include "gdbcore.h"
+#include <algorithm>
#ifdef HAVE_LIBLZMA
@@ -201,7 +202,7 @@ lzma_pread (struct bfd *nbfd, void *stream, void *buf, file_ptr nbytes,
+ iter.block.uncompressed_size);
}
- chunk_size = min (nbytes, lstream->data_end - offset);
+ chunk_size = std::min (nbytes, (file_ptr) lstream->data_end - offset);
memcpy (buf, lstream->data + offset - lstream->data_start, chunk_size);
buf = (gdb_byte *) buf + chunk_size;
offset += chunk_size;