Control: tags 1098142 + pending

Dear maintainer,

I've prepared an NMU for xine-lib-1.2 (versioned as 1.2.13+hg20240723-3.1)
and uploaded it to DELAYED/15. Please feel free to tell me if I should 
cancel it.

cu
Adrian
diffstat for xine-lib-1.2-1.2.13+hg20240723 xine-lib-1.2-1.2.13+hg20240723

 changelog                                   |    8 +
 patches/0001-Fix-qsort-compare-func.patch   |  140 ++++++++++++++++++++++++++++
 patches/0002-Fix-qsort-compare-func-2.patch |   33 ++++++
 patches/series                              |    2 
 4 files changed, 183 insertions(+)

diff -Nru xine-lib-1.2-1.2.13+hg20240723/debian/changelog xine-lib-1.2-1.2.13+hg20240723/debian/changelog
--- xine-lib-1.2-1.2.13+hg20240723/debian/changelog	2024-10-01 15:33:56.000000000 +0300
+++ xine-lib-1.2-1.2.13+hg20240723/debian/changelog	2025-10-05 13:01:55.000000000 +0300
@@ -1,3 +1,11 @@
+xine-lib-1.2 (1.2.13+hg20240723-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport upstream fixes for FTBFS with GCC 15,
+    thanks to Florian Ernst. (Closes: #1098142)
+
+ -- Adrian Bunk <[email protected]>  Sun, 05 Oct 2025 13:01:55 +0300
+
 xine-lib-1.2 (1.2.13+hg20240723-3) unstable; urgency=medium
 
   * Build depend on new pkgconf package.
diff -Nru xine-lib-1.2-1.2.13+hg20240723/debian/patches/0001-Fix-qsort-compare-func.patch xine-lib-1.2-1.2.13+hg20240723/debian/patches/0001-Fix-qsort-compare-func.patch
--- xine-lib-1.2-1.2.13+hg20240723/debian/patches/0001-Fix-qsort-compare-func.patch	1970-01-01 02:00:00.000000000 +0200
+++ xine-lib-1.2-1.2.13+hg20240723/debian/patches/0001-Fix-qsort-compare-func.patch	2025-10-05 12:56:37.000000000 +0300
@@ -0,0 +1,140 @@
+From 5177bc332cf3177d642473bc87a522ad9562b8fe Mon Sep 17 00:00:00 2001
+From: Torsten Jager <[email protected]>
+Date: Mon, 3 Feb 2025 23:34:50 +0100
+Subject: Fix qsort compare func. gcc 15 no longer accepts type (*func) () as a
+ generic pointer to any fuction returning type, and sometimes also bails on 
+ obvious type pun then dereference. Thanks to Xavier Bachelot
+ <[email protected]>.
+
+---
+ contrib/libfaad/sbr_fbt.c |  8 +++++---
+ src/input/input_file.c    | 25 ++++++++++++++-----------
+ src/input/input_smb.c     | 19 +++++++++++--------
+ 3 files changed, 30 insertions(+), 22 deletions(-)
+
+diff --git a/contrib/libfaad/sbr_fbt.c b/contrib/libfaad/sbr_fbt.c
+index 9c8f220ca..426525be1 100644
+--- a/contrib/libfaad/sbr_fbt.c
++++ b/contrib/libfaad/sbr_fbt.c
+@@ -105,9 +105,11 @@ uint8_t qmf_start_channel(uint8_t bs_start_freq, uint8_t bs_samplerate_mode,
+     }
+ }
+ 
+-static int longcmp(const void *a, const void *b)
+-{
+-    return ((int)(*(int32_t*)a - *(int32_t*)b));
++static int longcmp (const void *a, const void *b) {
++    const int32_t *d = (const int32_t *)a;
++    const int32_t *e = (const int32_t *)b;
++
++    return (int)(*d - *e);
+ }
+ 
+ /* calculate the stop QMF channel for the master frequency band table */
+diff --git a/src/input/input_file.c b/src/input/input_file.c
+index e6d3ecf51..3d3887632 100644
+--- a/src/input/input_file.c
++++ b/src/input/input_file.c
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (C) 2000-2022 the xine project
++ * Copyright (C) 2000-2025 the xine project
+  *
+  * This file is part of xine, a free video player.
+  *
+@@ -649,10 +649,13 @@ static int file_input_strverscmp (const char *s1, const char *s2) {
+ }
+ 
+ /*
+- * Wrapper to file_input_strverscmp() for qsort() calls, which sort mrl_t type array.
++ * Wrapper to file_input_strverscmp () for qsort () calls, which sort mrl_t type array.
+  */
+-static int file_input_sortfiles_default (const xine_mrl_t *s1, const xine_mrl_t *s2) {
+-  return(file_input_strverscmp(s1->mrl, s2->mrl));
++static int file_input_sortfiles_default (const void *a, const void *b) {
++  const xine_mrl_t *d = (const xine_mrl_t *)a;
++  const xine_mrl_t *e = (const xine_mrl_t *)b;
++
++  return file_input_strverscmp (d->mrl, e->mrl);
+ }
+ 
+ /*
+@@ -735,7 +738,7 @@ static xine_mrl_t **file_input_class_get_dir (input_class_t *this_gen, const cha
+   int                   num_dir_files   = 0;
+   int                   num_norm_files  = 0;
+   int                   num_files       = -1;
+-  int                 (*func) ()        = file_input_sortfiles_default;
++  int                 (*cmp) (const void *a, const void *b) = file_input_sortfiles_default;
+   int                   already_tried   = 0;
+   int                   show_hidden_files;
+ 
+@@ -914,14 +917,14 @@ static xine_mrl_t **file_input_class_get_dir (input_class_t *this_gen, const cha
+     /*
+      * Sort arrays
+      */
+-    if(num_dir_files)
+-      qsort(dir_files, num_dir_files, sizeof(xine_mrl_t), func);
++    if (num_dir_files)
++      qsort (dir_files, num_dir_files, sizeof (xine_mrl_t), cmp);
+ 
+-    if(num_hide_files)
+-      qsort(hide_files, num_hide_files, sizeof(xine_mrl_t), func);
++    if (num_hide_files)
++      qsort (hide_files, num_hide_files, sizeof (xine_mrl_t), cmp);
+ 
+-    if(num_norm_files)
+-      qsort(norm_files, num_norm_files, sizeof(xine_mrl_t), func);
++    if (num_norm_files)
++      qsort (norm_files, num_norm_files, sizeof (xine_mrl_t), cmp);
+ 
+     /*
+      * Add directories entries
+diff --git a/src/input/input_smb.c b/src/input/input_smb.c
+index 43f2d3a51..8b64c1ade 100644
+--- a/src/input/input_smb.c
++++ b/src/input/input_smb.c
+@@ -229,10 +229,13 @@ static int _strverscmp(const char *s1, const char *s2) {
+ }
+ 
+ /*
+- * Wrapper to _strverscmp() for qsort() calls, which sort mrl_t type array.
++ * Wrapper to _strverscmp () for qsort () calls, which sort mrl_t type array.
+  */
+-static int _sortfiles_default(const xine_mrl_t *s1, const xine_mrl_t *s2) {
+-  return(_strverscmp(s1->mrl, s2->mrl));
++static int smb_input_sortfiles_default (const void *a, const void *b) {
++  const xine_mrl_t *d = (const xine_mrl_t *)a;
++  const xine_mrl_t *e = (const xine_mrl_t *)b;
++
++  return file_input_strverscmp (d->mrl, e->mrl);
+ }
+ 
+ 
+@@ -240,7 +243,7 @@ static xine_mrl_t **smb_class_get_dir (input_class_t *this_gen,
+           const char *filename, int *nFiles) {
+ 
+ 	smb_input_class_t   *this = (smb_input_class_t *) this_gen;
+-	int                 (*func) ()        = _sortfiles_default;
++	int                (*cmp) (const void *a, const void *b) = smb_input_sortfiles_default;
+ 	int        dir;
+ 	int i;
+ 	struct smbc_dirent  *pdirent;
+@@ -338,11 +341,11 @@ static xine_mrl_t **smb_class_get_dir (input_class_t *this_gen,
+ 		/*
+ 		 * Sort arrays
+ 		 */
+-		if(num_dir_files)
+-			qsort(dir_files, num_dir_files, sizeof(xine_mrl_t), func);
++		if (num_dir_files)
++			qsort (dir_files, num_dir_files, sizeof (xine_mrl_t), cmp);
+ 
+-		if(num_norm_files)
+-			qsort(norm_files, num_norm_files, sizeof(xine_mrl_t), func);
++		if (num_norm_files)
++			qsort (norm_files, num_norm_files, sizeof (xine_mrl_t), cmp);
+ 
+ 		/*
+ 		 * Add directories entries
+-- 
+2.30.2
+
diff -Nru xine-lib-1.2-1.2.13+hg20240723/debian/patches/0002-Fix-qsort-compare-func-2.patch xine-lib-1.2-1.2.13+hg20240723/debian/patches/0002-Fix-qsort-compare-func-2.patch
--- xine-lib-1.2-1.2.13+hg20240723/debian/patches/0002-Fix-qsort-compare-func-2.patch	1970-01-01 02:00:00.000000000 +0200
+++ xine-lib-1.2-1.2.13+hg20240723/debian/patches/0002-Fix-qsort-compare-func-2.patch	2025-10-05 12:56:37.000000000 +0300
@@ -0,0 +1,33 @@
+From 053fa54a672eeb1b73d5516188a2a8cb68c465a8 Mon Sep 17 00:00:00 2001
+From: Torsten Jager <[email protected]>
+Date: Thu, 6 Feb 2025 23:30:40 +0100
+Subject: Fix qsort compare func 2. Thanks to Xavier Bachelot
+ <[email protected]>.
+
+---
+ src/input/input_smb.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/input/input_smb.c b/src/input/input_smb.c
+index 8b64c1ade..09a79194f 100644
+--- a/src/input/input_smb.c
++++ b/src/input/input_smb.c
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (C) 2008-2020 the xine project
++ * Copyright (C) 2008-2025 the xine project
+  *
+  * This file is part of xine, a free video player.
+  *
+@@ -235,7 +235,7 @@ static int smb_input_sortfiles_default (const void *a, const void *b) {
+   const xine_mrl_t *d = (const xine_mrl_t *)a;
+   const xine_mrl_t *e = (const xine_mrl_t *)b;
+ 
+-  return file_input_strverscmp (d->mrl, e->mrl);
++  return _strverscmp (d->mrl, e->mrl);
+ }
+ 
+ 
+-- 
+2.30.2
+
diff -Nru xine-lib-1.2-1.2.13+hg20240723/debian/patches/series xine-lib-1.2-1.2.13+hg20240723/debian/patches/series
--- xine-lib-1.2-1.2.13+hg20240723/debian/patches/series	1970-01-01 02:00:00.000000000 +0200
+++ xine-lib-1.2-1.2.13+hg20240723/debian/patches/series	2025-10-05 13:01:50.000000000 +0300
@@ -0,0 +1,2 @@
+0001-Fix-qsort-compare-func.patch
+0002-Fix-qsort-compare-func-2.patch

Reply via email to