diff -pruN 0.09008-4/debian/changelog 0.09008-5/debian/changelog
--- 0.09008-4/debian/changelog	2021-11-03 15:48:51.000000000 +0000
+++ 0.09008-5/debian/changelog	2025-10-16 17:24:29.000000000 +0000
@@ -1,3 +1,13 @@
+libfile-mmagic-xs-perl (0.09008-5) unstable; urgency=medium
+
+  * Build with -std=gnu17. (Closes: #1097185)
+  * Update years of packaging copyright.
+  * Declare compliance with Debian Policy 4.7.2.
+  * Remove «Rules-Requires-Root: no», which is the current default.
+  * Remove «Priority: optional», which is the current default.
+
+ -- gregor herrmann <gregoa@debian.org>  Thu, 16 Oct 2025 19:24:29 +0200
+
 libfile-mmagic-xs-perl (0.09008-4) unstable; urgency=medium
 
   * debian/rules: make usage of $Config{vendorarch} cross-build-
diff -pruN 0.09008-4/debian/control 0.09008-5/debian/control
--- 0.09008-4/debian/control	2021-11-03 15:48:51.000000000 +0000
+++ 0.09008-5/debian/control	2025-10-16 17:24:29.000000000 +0000
@@ -1,27 +1,28 @@
 Source: libfile-mmagic-xs-perl
+Standards-Version: 4.7.2
 Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
-Uploaders: gregor herrmann <gregoa@debian.org>,
-           Ansgar Burchardt <ansgar@debian.org>,
-           Dominic Hargreaves <dom@earth.li>
+Uploaders:
+ gregor herrmann <gregoa@debian.org>,
+ Ansgar Burchardt <ansgar@debian.org>,
+ Dominic Hargreaves <dom@earth.li>,
 Section: perl
 Testsuite: autopkgtest-pkg-perl
-Priority: optional
-Build-Depends: debhelper-compat (= 13),
-               libextutils-parsexs-perl,
-               libmodule-install-perl,
-               perl-xs-dev,
-               perl:native
-Standards-Version: 4.6.0
+Build-Depends:
+ debhelper-compat (= 13),
+ libextutils-parsexs-perl,
+ libmodule-install-perl,
+ perl-xs-dev,
+ perl:native,
 Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libfile-mmagic-xs-perl
 Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libfile-mmagic-xs-perl.git
 Homepage: https://metacpan.org/release/File-MMagic-XS
-Rules-Requires-Root: no
 
 Package: libfile-mmagic-xs-perl
 Architecture: any
-Depends: ${misc:Depends},
-         ${perl:Depends},
-         ${shlibs:Depends}
+Depends:
+ ${misc:Depends},
+ ${perl:Depends},
+ ${shlibs:Depends},
 Description: Perl module to guess file type (à la mod_mime_magic)
  File::MMagic::XS is a port of Apache2 mod_mime_magic.c in Perl, written in
  XS with the aim of being efficient and fast, especially for applications
diff -pruN 0.09008-4/debian/copyright 0.09008-5/debian/copyright
--- 0.09008-4/debian/copyright	2021-11-03 15:48:51.000000000 +0000
+++ 0.09008-5/debian/copyright	2025-10-16 17:24:29.000000000 +0000
@@ -102,7 +102,7 @@ License: Artistic or GPL-1+
 
 Files: debian/*
 Copyright:
- 2008-2021, gregor herrmann <gregoa@debian.org>
+ 2008-2025, gregor herrmann <gregoa@debian.org>
  2010, Ansgar Burchardt <ansgar@debian.org>
 License: Artistic or GPL-1+
 
diff -pruN 0.09008-4/debian/patches/fix-gcc15-build.patch 0.09008-5/debian/patches/fix-gcc15-build.patch
--- 0.09008-4/debian/patches/fix-gcc15-build.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.09008-5/debian/patches/fix-gcc15-build.patch	2025-10-16 17:24:29.000000000 +0000
@@ -0,0 +1,102 @@
+From: Victor Seva <vseva@debian.org>
+Date: Tue, 16 Sep 2025 18:20:41 +0200
+Subject: fix gcc15 build
+
+---
+ src/MMagicST.c | 30 +++++++++++++++++-------------
+ src/MMagicST.h |  4 ++--
+ 2 files changed, 19 insertions(+), 15 deletions(-)
+
+diff --git a/src/MMagicST.c b/src/MMagicST.c
+index 01e616c..d7cb81d 100644
+--- a/src/MMagicST.c
++++ b/src/MMagicST.c
+@@ -35,17 +35,17 @@ struct st_table_entry {
+      * allocated initially
+      *
+      */
+-static int numcmp(long, long);
+-static int numhash(long);
++static int numcmp(const void *, const void *);
++static int numhash(const void *);
+ static struct st_hash_type type_numhash = {
+     numcmp,
+     numhash,
+ };
+ 
+-/* extern int strcmp(const char *, const char *); */
+-static int strhash(const char *);
++static int mm_strcmp(const void *, const void *);
++static int strhash(const void *);
+ static struct st_hash_type type_strhash = {
+-    strcmp,
++    mm_strcmp,
+     strhash,
+ };
+ 
+@@ -69,9 +69,9 @@ static void rehash(st_table *);
+ #define alloc(type) (type*)xmalloc((unsigned)sizeof(type))
+ #define Calloc(n,s) (char*)xcalloc((n),(s))
+ 
+-#define EQUAL(table,x,y) ((x)==(y) || (*table->type->compare)((x),(y)) == 0)
++#define EQUAL(table,x,y) ((x)==(y) || (*table->type->compare)((void *)(x),(void *)(y)) == 0)
+ 
+-#define do_hash(key,table) (unsigned int)(*(table)->type->hash)((key))
++#define do_hash(key,table) (unsigned int)(*(table)->type->hash)((void *)(key))
+ #define do_hash_bin(key,table) (do_hash(key, table)%(table)->num_bins)
+ 
+ /*
+@@ -533,11 +533,15 @@ st_foreach(table, func, arg)
+ 	}
+     }
+ }
++static int
++mm_strcmp(const void *arg1, const void *arg2) {
++    return strcmp((const char *)arg1, (const char *)arg2);
++}
+ 
+ static int
+-strhash(string)
+-    register const char *string;
++strhash(const void *arg)
+ {
++    register const char *string = (const char *)arg;
+     register int c;
+ 
+ #ifdef HASH_ELFHASH
+@@ -574,16 +578,16 @@ strhash(string)
+ }
+ 
+ static int
+-numcmp(x, y)
+-    long x, y;
++numcmp(const void *arg1, const void *arg2)
+ {
++    long x = (long)arg1, y = (long)arg2;
+     return x != y;
+ }
+ 
+ static int
+-numhash(n)
+-    long n;
++numhash(const void *arg1)
+ {
++    long n = (long)arg1;
+     return n;
+ }
+ 
+diff --git a/src/MMagicST.h b/src/MMagicST.h
+index bc12624..528a48b 100644
+--- a/src/MMagicST.h
++++ b/src/MMagicST.h
+@@ -12,8 +12,8 @@ typedef unsigned long st_data_t;
+ typedef struct st_table st_table;
+ 
+ struct st_hash_type {
+-    int (*compare)();
+-    int (*hash)();
++    int (*compare)(const void *, const void *);
++    int (*hash)(const void *);
+ };
+ 
+ struct st_table {
diff -pruN 0.09008-4/debian/patches/series 0.09008-5/debian/patches/series
--- 0.09008-4/debian/patches/series	2021-11-03 15:48:51.000000000 +0000
+++ 0.09008-5/debian/patches/series	2025-10-16 17:24:29.000000000 +0000
@@ -1,2 +1,3 @@
 format_string_fix.diff
 debian-build.patch
+#fix-gcc15-build.patch
diff -pruN 0.09008-4/debian/rules 0.09008-5/debian/rules
--- 0.09008-4/debian/rules	2021-11-03 15:48:51.000000000 +0000
+++ 0.09008-5/debian/rules	2025-10-16 17:24:29.000000000 +0000
@@ -8,6 +8,7 @@ PERLVER := $(shell perl -MConfig -e 'pri
 ARCHLIB := $(shell perl -I/usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER) -MConfig -e 'print $$Config{vendorarch}')
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_CFLAGS_MAINT_APPEND = -std=gnu17
 
 %:
 	dh $@
