Source: gdb
Version: 8.2.1-1
Severity: important
Tags: ftbfs, patch
User: [email protected]
Usertags: kfreebsd

Hello,

Currently libdrm FTBFS on GNU/kFreeBSD due to a change of "struct
nlist" in the header file /usr/include/bsd/nlist.h.

Attached is a patch to make gdb build properly on kfreebsd-any.

Thanks!
Index: gdb-8.2/gdb/bsd-kvm.c
===================================================================
--- gdb-8.2.orig/gdb/bsd-kvm.c
+++ gdb-8.2/gdb/bsd-kvm.c
@@ -237,7 +237,7 @@ bsd_kvm_target::fetch_registers (struct
   /* On dumping core, BSD kernels store the faulting context (PCB)
      in the variable "dumppcb".  */
   memset (nl, 0, sizeof nl);
-  nl[0].n_name = "_dumppcb";
+  nl[0].n_un.n_name = (char *)"_dumppcb";
 
   if (kvm_nlist (core_kd, nl) == -1)
     error (("%s"), kvm_geterr (core_kd));
@@ -255,7 +255,7 @@ bsd_kvm_target::fetch_registers (struct
      "proc0paddr".  */
 
   memset (nl, 0, sizeof nl);
-  nl[0].n_name = "_proc0paddr";
+  nl[0].n_un.n_name = (char *)"_proc0paddr";
 
   if (kvm_nlist (core_kd, nl) == -1)
     error (("%s"), kvm_geterr (core_kd));
@@ -279,7 +279,7 @@ bsd_kvm_target::fetch_registers (struct
      variable "thread0".  */
 
   memset (nl, 0, sizeof nl);
-  nl[0].n_name = "_thread0";
+  nl[0].n_un.n_name = (char *)"_thread0";
 
   if (kvm_nlist (core_kd, nl) == -1)
     error (("%s"), kvm_geterr (core_kd));

Reply via email to