[binutils-gdb] gdb: Fix build for gnu hurd

Tom de Vries via Gdb-cvs <[email protected]> Tue, 9 Jun 2026 08:28:06 +0000 (GMT)
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bccfda8cc930fc2d16e65cd6df130bc7722dc772

commit bccfda8cc930fc2d16e65cd6df130bc7722dc772
Author: Etienne Brateau <[email protected]>
Date:   Tue Jun 9 10:27:57 2026 +0200

    gdb: Fix build for gnu hurd
    
    Commit 695fd5ec122 ("gdb: make find_memory_region_ftype a function_view")
    broke the build for gnu hurd.  Fix this.
    
    Approved-By: Tom de Vries <[email protected]>

Diff:
---
 gdb/gnu-nat.c | 2 +-
 gdb/gnu-nat.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 985aa14debc..4999734b6d9 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -2617,7 +2617,7 @@ gnu_nat_target::find_memory_regions (find_memory_region_ftype func)
 	  /* This region is distinct from the last one we saw, so report
 	     that previous one.  */
 	  if (last_protection != VM_PROT_NONE)
-	    (*func) (last_region_address,
+	    func (last_region_address,
 		     last_region_end - last_region_address,
 		     last_protection & VM_PROT_READ,
 		     last_protection & VM_PROT_WRITE,
diff --git a/gdb/gnu-nat.h b/gdb/gnu-nat.h
index f4b3e3daec2..2ab06c8078e 100644
--- a/gdb/gnu-nat.h
+++ b/gdb/gnu-nat.h
@@ -130,7 +130,7 @@ struct gnu_nat_target : public inf_child_target
 					ULONGEST offset, ULONGEST len,
 					ULONGEST *xfered_len) override;
 
-  bool find_memory_regions (find_memory_region_ftype func, void *data)
+  bool find_memory_regions (find_memory_region_ftype func)
     override;
   void kill () override;