git: 0c6176a08500 - main - lang/gnat15: Fix build post-base d08296c7ab0d

From: Thierry Thomas <thierry_at_FreeBSD.org>
Date: Thu, 17 Sep 2026 17:25:32 UTC
The branch main has been updated by thierry:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0c6176a08500559e7e2ced7ea8af5a080b75e92b

commit 0c6176a08500559e7e2ced7ea8af5a080b75e92b
Author:     Alastair Hogge <agh@riseup.net>
AuthorDate: 2026-08-28 08:03:52 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2026-09-17 17:23:19 +0000

    lang/gnat15: Fix build post-base d08296c7ab0d
    
    The fixes come from lang/gcc15.
    
    PR:             297878
---
 lang/gnat15/files/patch-include_libiberty.h    | 11 +++++++++++
 lang/gnat15/files/patch-libgomp_affinity-fmt.c | 11 +++++++++++
 2 files changed, 22 insertions(+)

diff --git a/lang/gnat15/files/patch-include_libiberty.h b/lang/gnat15/files/patch-include_libiberty.h
new file mode 100644
index 000000000000..c082051d9f88
--- /dev/null
+++ b/lang/gnat15/files/patch-include_libiberty.h
@@ -0,0 +1,11 @@
+--- include/libiberty.h.orig	2025-08-08 06:51:44 UTC
++++ include/libiberty.h
+@@ -221,7 +221,7 @@ extern int mkstemps(char *, int);
+ 
+ /* Make memrchr available on systems that do not have it.  */
+ #if !defined (__GNU_LIBRARY__ ) && !defined (__linux__) && \
+-    !defined (HAVE_MEMRCHR)
++    !defined (__FreeBSD__) && !defined (HAVE_MEMRCHR)
+ extern void *memrchr(const void *, int, size_t);
+ #endif
+ 
diff --git a/lang/gnat15/files/patch-libgomp_affinity-fmt.c b/lang/gnat15/files/patch-libgomp_affinity-fmt.c
new file mode 100644
index 000000000000..fa3ab1ae484f
--- /dev/null
+++ b/lang/gnat15/files/patch-libgomp_affinity-fmt.c
@@ -0,0 +1,11 @@
+--- libgomp/affinity-fmt.c.orig	2025-08-08 06:51:45 UTC
++++ libgomp/affinity-fmt.c
+@@ -327,7 +327,7 @@ gomp_display_affinity (char *buffer, size_t size,
+ 	      }
+ 	  if (c == '{')
+ 	    {
+-	      char *q = strchr (p + 1, '}');
++	      const char *q = strchr (p + 1, '}');
+ 	      if (q)
+ 		gomp_fatal ("unsupported long type name '%.*s' in affinity "
+ 			    "format", (int) (q - (p + 1)), p + 1);