Control: tags 1097903 + patch
Control: tags 1097903 + pending

Dear maintainer,

I've prepared an NMU for smenu (versioned as 1.4.0-1.1) and uploaded
it to DELAYED/2. Please feel free to tell me if I should cancel it.

cu
Adrian
diffstat for smenu-1.4.0 smenu-1.4.0

 changelog                                                           |    7 
 patches/0001-Fix-ctxopt.c-so-that-it-can-be-compiled-by-gcc15.patch |   77 ++++++++++
 patches/series                                                      |    1 
 3 files changed, 85 insertions(+)

diff -Nru smenu-1.4.0/debian/changelog smenu-1.4.0/debian/changelog
--- smenu-1.4.0/debian/changelog	2025-05-10 17:09:29.000000000 +0300
+++ smenu-1.4.0/debian/changelog	2025-10-25 12:48:07.000000000 +0300
@@ -1,3 +1,10 @@
+smenu (1.4.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport upstream fix for FTBFS with GCC 15. (Closes: #1097903)
+
+ -- Adrian Bunk <[email protected]>  Sat, 25 Oct 2025 12:48:07 +0300
+
 smenu (1.4.0-1) unstable; urgency=medium
 
   * New upstream version.
diff -Nru smenu-1.4.0/debian/patches/0001-Fix-ctxopt.c-so-that-it-can-be-compiled-by-gcc15.patch smenu-1.4.0/debian/patches/0001-Fix-ctxopt.c-so-that-it-can-be-compiled-by-gcc15.patch
--- smenu-1.4.0/debian/patches/0001-Fix-ctxopt.c-so-that-it-can-be-compiled-by-gcc15.patch	1970-01-01 02:00:00.000000000 +0200
+++ smenu-1.4.0/debian/patches/0001-Fix-ctxopt.c-so-that-it-can-be-compiled-by-gcc15.patch	2025-10-25 12:47:23.000000000 +0300
@@ -0,0 +1,77 @@
+From e4b2233d24f8c4381bc87e76179b7d5d2e95b7e5 Mon Sep 17 00:00:00 2001
+From: pgen <[email protected]>
+Date: Thu, 1 May 2025 00:09:01 +0200
+Subject: Fix ctxopt.c so that it can be compiled by gcc15
+
+Solves https://github.com/p-gen/smenu/issues/46
+---
+ ctxopt.c | 20 ++++++++++++++------
+ 1 file changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/ctxopt.c b/ctxopt.c
+index 756202d..9829ea2 100644
+--- a/ctxopt.c
++++ b/ctxopt.c
+@@ -4654,7 +4654,15 @@ ctxopt_add_opt_settings(settings s, ...)
+     case actions:
+     {
+       void *data;
+-      void (*function)();
++      void (*function)(char *,
++                       char *,
++                       char *,
++                       int,
++                       char **,
++                       int,
++                       void **,
++                       int,
++                       void **);
+       int nb_data = 0;
+ 
+       /* The second argument must be the name of an existing option. */
+@@ -4664,7 +4672,7 @@ ctxopt_add_opt_settings(settings s, ...)
+       if ((opt = locate_opt(ptr)) != NULL)
+       {
+         typedef void
+-        fn(char *, char *, char *, int, char **, int, void *, int, void **);
++        fn(char *, char *, char *, int, char **, int, void **, int, void **);
+ 
+         /* The third argument must be the callback function. */
+         /* """"""""""""""""""""""""""""""""""""""""""""""""" */
+@@ -4696,7 +4704,7 @@ ctxopt_add_opt_settings(settings s, ...)
+     {
+       char         *value;
+       constraint_t *cstr;
+-      int (*function)();
++      int (*function)(int, char **, char *, char *);
+ 
+       /* The second argument must be a string. */
+       /* """"""""""""""""""""""""""""""""""""" */
+@@ -4704,7 +4712,7 @@ ctxopt_add_opt_settings(settings s, ...)
+ 
+       if ((opt = locate_opt(ptr)) != NULL)
+       {
+-        typedef int fn(int, char **, char *);
++        typedef int fn(int, char **, char *, char *);
+ 
+         /* The third argument must be a function. */
+         /* """""""""""""""""""""""""""""""""""""" */
+@@ -4964,13 +4972,13 @@ ctxopt_add_ctx_settings(settings s, ...)
+     {
+       void *ptr;
+       void *data;
+-      int (*function)();
++      int (*function)(char *, int, char *, int, void **);
+       int nb_data = 0;
+ 
+       ptr = va_arg(args, char *);
+       if ((ctx = locate_ctx(ptr)) != NULL)
+       {
+-        typedef int fn(char *, direction, char *, int, void **);
++        typedef int fn(char *, int, char *, int, void **);
+ 
+         function    = va_arg(args, fn *);
+         ctx->action = function;
+-- 
+2.30.2
+
diff -Nru smenu-1.4.0/debian/patches/series smenu-1.4.0/debian/patches/series
--- smenu-1.4.0/debian/patches/series	2025-05-10 17:09:29.000000000 +0300
+++ smenu-1.4.0/debian/patches/series	2025-10-25 12:48:07.000000000 +0300
@@ -1,2 +1,3 @@
 0001-smenu.1-Enable-table-preprocessor.patch
 0002-smenu.1-Other-man-warnings-fixes-typo.patch
+0001-Fix-ctxopt.c-so-that-it-can-be-compiled-by-gcc15.patch

Reply via email to