From: John Baldwin Date: Wed, 9 Aug 2017 22:24:46 +0000 (-0700) Subject: Fix compile in the !HAVE_KINFO_GETVMMAP case. X-Git-Tag: users/ARM/embedded-binutils-master-2017q4~1422 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=142311d325b962730f7d0247cc456f06e5c7b62b;p=external%2Fbinutils.git Fix compile in the !HAVE_KINFO_GETVMMAP case. gdb/ChangeLog: * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include and "filestuff.h". (fbsd_find_memory_regions): Fix `mapfile' initialization. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 55a0b12..aa2a48e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2017-08-09 John Baldwin + + * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include and + "filestuff.h". + (fbsd_find_memory_regions): Fix `mapfile' initialization. + 2017-08-09 Tom Tromey * skip.c (skiplist_entry): New constructor. diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c index 833f460..3d3aa3d 100644 --- a/gdb/fbsd-nat.c +++ b/gdb/fbsd-nat.c @@ -30,9 +30,11 @@ #include #include #include -#ifdef HAVE_KINFO_GETVMMAP #include +#ifdef HAVE_KINFO_GETVMMAP #include +#else +#include "filestuff.h" #endif #include "elf-bfd.h" @@ -168,7 +170,7 @@ fbsd_find_memory_regions (struct target_ops *self, mapfilename = xstrprintf ("/proc/%ld/map", (long) pid); cleanup = make_cleanup (xfree, mapfilename); - gdb_file_up mapfile = fopen (mapfilename, "r"); + gdb_file_up mapfile (fopen (mapfilename, "r")); if (mapfile == NULL) error (_("Couldn't open %s."), mapfilename);