Control: tags 1074915 + pending

Dear maintainer,

I've prepared an NMU for discount (versioned as 2.2.7-2.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards.

diff -Nru discount-2.2.7/debian/changelog discount-2.2.7/debian/changelog
--- discount-2.2.7/debian/changelog	2021-09-03 14:37:06.000000000 -0300
+++ discount-2.2.7/debian/changelog	2024-11-13 12:32:17.000000000 -0300
@@ -1,3 +1,11 @@
+discount (2.2.7-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/patches/0004-fix-build-with-gcc14.patch: Fix build with GCC 14.
+    Thanks to Atri Bhattacharya and Florian Ernst (Closes: #1074915).
+
+ -- Marcos Talau <ta...@debian.org>  Wed, 13 Nov 2024 12:32:17 -0300
+
 discount (2.2.7-2) unstable; urgency=medium
 
   [ Balint Reczey ]
diff -Nru discount-2.2.7/debian/patches/0004-fix-build-with-gcc14.patch discount-2.2.7/debian/patches/0004-fix-build-with-gcc14.patch
--- discount-2.2.7/debian/patches/0004-fix-build-with-gcc14.patch	1969-12-31 21:00:00.000000000 -0300
+++ discount-2.2.7/debian/patches/0004-fix-build-with-gcc14.patch	2024-11-13 12:27:42.000000000 -0300
@@ -0,0 +1,43 @@
+Description: Fix build with GCC-14
+Author: Atri Bhattacharya <badshah...@gmail.com>
+Bug: https://github.com/Orc/discount/issues/283
+Bug-Debian: https://bugs.debian.org/1074915
+Forwarded: not-needed
+Applied-Upstream: https://github.com/soult/text-markdown-discount/commit/ca432b27d6605f966d21ead33b19baa969695ad4
+Last-Update: 2024-11-13
+
+--- a/main.c
++++ b/main.c
+@@ -100,14 +100,15 @@ free_it(char *object, void *ctx)
+ }
+ 
+ char *
+-external_codefmt(char *src, int len, char *lang)
++external_codefmt(const char *src, const int len, void *lang)
+ {
+     int extra = 0;
+     int i, x;
+     char *res;
++    char *ec_lang = (char *)lang;
+ 
+-    if ( lang == 0 )
+-	lang = "generic_code";
++    if ( ec_lang == 0 )
++	ec_lang = "generic_code";
+ 
+     for ( i=0; i < len; i++) {
+ 	if ( src[i] == '&' )
+@@ -117,11 +118,11 @@ external_codefmt(char *src, int len, cha
+     }
+ 
+     /* 80 characters for the format wrappers */
+-    if ( (res = malloc(len+extra+80+strlen(lang))) ==0 )
++    if ( (res = malloc(len+extra+80+strlen(ec_lang))) ==0 )
+ 	/* out of memory?  drat! */
+ 	return 0;
+ 
+-    sprintf(res, "<pre><code class=\"%s\">\n", lang);
++    sprintf(res, "<pre><code class=\"%s\">\n", ec_lang);
+     x = strlen(res);
+     for ( i=0; i < len; i++ ) {
+ 	switch (src[i]) {
diff -Nru discount-2.2.7/debian/patches/series discount-2.2.7/debian/patches/series
--- discount-2.2.7/debian/patches/series	2021-09-03 14:37:06.000000000 -0300
+++ discount-2.2.7/debian/patches/series	2024-11-13 12:19:18.000000000 -0300
@@ -1,3 +1,4 @@
 0001-Honor-CPPFLAGS.patch
 0002-Honor-system-s-LDFLAGS-in-librarian.sh.patch
 03_fix-typo.patch
+0004-fix-build-with-gcc14.patch

Reply via email to