[pushed] gdb/s390: Fix build breakage due to std::min/std::max usage without header
Commit Message
On 09/16/2016 08:00 PM, Pedro Alves wrote:
> From 325fac504a327de9c46a4e5cf9c88ece9d9d7701 Mon Sep 17 00:00:00 2001
> From: Pedro Alves <palves@redhat.com>
> Date: Fri, 16 Sep 2016 19:55:17 +0100
> Subject: [PATCH] gdb: Use std::min and std::max throughout
This broke the build on s390. I've pushed the obvious fix below.
Hindsight is showing I have lost a good opportunity to try the trybot...
From 93689493b376c4e5616c1679733619f96202c369 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Mon, 19 Sep 2016 00:30:30 +0100
Subject: [PATCH] gdb/s390: Fix build breakage due to std::min/std::max usage
without header
[...]
.../gdb/s390-linux-nat.c: In function 'void s390_prepare_to_resume(lwp_info*)':
.../gdb/s390-linux-nat.c:703:20: error: 'min' is not a member of 'std'
watch_lo_addr = std::min (watch_lo_addr, area->lo_addr);
[...]
gdb/ChangeLog:
2016-09-18 Pedro Alves <palves@redhat.com>
* s390-linux-nat.c: Include <algorithm>.
---
gdb/ChangeLog | 4 ++++
gdb/s390-linux-nat.c | 1 +
2 files changed, 5 insertions(+)
@@ -1,5 +1,9 @@
2016-09-18 Pedro Alves <palves@redhat.com>
+ * s390-linux-nat.c: Include <algorithm>.
+
+2016-09-18 Pedro Alves <palves@redhat.com>
+
* breakpoint.c (hardware_watchpoint_inserted_in_range): Explicitly
specify the std:min/std::max specialization.
* exec.c (section_table_read_available_memory): Likewise.
@@ -39,6 +39,7 @@
#include <sys/procfs.h>
#include <sys/ucontext.h>
#include <elf.h>
+#include <algorithm>
/* Per-thread arch-specific data. */