$OpenBSD: patch-gdb_mips64obsd-nat_c,v 1.2 2016/10/21 13:13:31 visa Exp $
--- gdb/mips64obsd-nat.c.orig	Mon Aug  1 09:50:20 2016
+++ gdb/mips64obsd-nat.c	Tue Oct 18 07:24:31 2016
@@ -40,7 +40,7 @@
 static void
 mips64obsd_supply_gregset (struct regcache *regcache, const void *gregs)
 {
-  const char *regs = gregs;
+  const char *regs = (const char *) gregs;
   int regnum;
 
   for (regnum = MIPS_ZERO_REGNUM; regnum <= MIPS_PC_REGNUM; regnum++)
@@ -57,7 +57,7 @@ static void
 mips64obsd_collect_gregset (const struct regcache *regcache,
 			    void *gregs, int regnum)
 {
-  char *regs = gregs;
+  char *regs = (char *) gregs;
   int i;
 
   for (i = MIPS_ZERO_REGNUM; i <= MIPS_PC_REGNUM; i++)
@@ -83,7 +83,7 @@ mips64obsd_fetch_inferior_registers (struct target_ops
 {
   struct reg regs;
 
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+  if (ptrace (PT_GETREGS, get_ptrace_pid (inferior_ptid),
 	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
     perror_with_name (_("Couldn't get registers"));
 
@@ -99,13 +99,13 @@ mips64obsd_store_inferior_registers (struct target_ops
 {
   struct reg regs;
 
-  if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+  if (ptrace (PT_GETREGS, get_ptrace_pid (inferior_ptid),
 	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
     perror_with_name (_("Couldn't get registers"));
 
   mips64obsd_collect_gregset (regcache, &regs, regnum);
 
-  if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+  if (ptrace (PT_SETREGS, get_ptrace_pid (inferior_ptid),
 	      (PTRACE_TYPE_ARG3) &regs, 0) == -1)
     perror_with_name (_("Couldn't write registers"));
 }
