gdb/riscv: Use legacy register numbers in default target description
[external/binutils.git] / gdb / common / vec.c
index 4611e5f..a889544 100644 (file)
@@ -1,5 +1,5 @@
 /* Vector API for GDB.
-   Copyright (C) 2004-2014 Free Software Foundation, Inc.
+   Copyright (C) 2004-2019 Free Software Foundation, Inc.
    Contributed by Nathan Sidwell <nathan@codesourcery.com>
 
    This file is part of GDB.
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "vec.h"
 
 struct vec_prefix
@@ -95,7 +90,7 @@ vec_p_reserve (void *vec, int reserve)
 void *
 vec_o_reserve (void *vec, int reserve, size_t vec_offset, size_t elt_size)
 {
-  struct vec_prefix *pfx = vec;
+  struct vec_prefix *pfx = (struct vec_prefix *) vec;
   unsigned alloc = calculate_allocation (pfx, reserve);
 
   if (!alloc)