Package: scrollz
Followup-For: Bug #1066483
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * debian/patches/gcc13.patch: Fix build with GCC 13 and add missing
    includes.  Closes LP: #2061184.


Thanks for considering the patch.


-- System Information:
Debian Release: bookworm/sid
  APT prefers jammy-updates
  APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), 
(100, 'jammy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-26-generic (SMP w/10 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru scrollz-2.2.3/debian/patches/gcc13.patch 
scrollz-2.2.3/debian/patches/gcc13.patch
--- scrollz-2.2.3/debian/patches/gcc13.patch    1969-12-31 17:00:00.000000000 
-0700
+++ scrollz-2.2.3/debian/patches/gcc13.patch    2024-04-12 16:18:41.000000000 
-0600
@@ -0,0 +1,131 @@
+Description: Fix build with GCC 13 and add missing includes
+ Also included missing function prototypes
+Author: Zixing Liu <zixing....@canonical.com>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066483
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/scrollz/+bug/2061184
+Forwarded: no
+Last-Update: 2024-04-12
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: scrollz/configure
+===================================================================
+--- scrollz.orig/configure
++++ scrollz/configure
+@@ -2317,6 +2317,7 @@ else
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char snprintf(); below.  */
+ #include <assert.h>
++#include <stdio.h>
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+@@ -2368,6 +2369,7 @@ else
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char vsnprintf(); below.  */
+ #include <assert.h>
++#include <stdio.h>
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+@@ -2536,6 +2538,7 @@ else
+ #line 2537 "configure"
+ #include "confdefs.h"
+ #include <ctype.h>
++#include <stdlib.h>
+ #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+ #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+ #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+@@ -5472,6 +5475,7 @@ else
+ #include <string.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
++#include <stdlib.h>
+ 
+ main()
+ {
+Index: scrollz/include/edit.h
+===================================================================
+--- scrollz.orig/include/edit.h
++++ scrollz/include/edit.h
+@@ -72,7 +72,7 @@ extern       u_char  *recv_nick;
+       void    command_completion _((u_int, char *));
+       void    e_quit _((char *, char *, char *));
+       int     check_wait_command _((char *));
+-      
++      int  GrabURL _((char *, char *, char *, char *));
+ #define AWAY_ONE 0
+ #define AWAY_ALL 1
+ 
+Index: scrollz/include/trace.h
+===================================================================
+--- scrollz.orig/include/trace.h
++++ scrollz/include/trace.h
+@@ -29,4 +29,6 @@ void TraceChannelInfo _((int indent, Cha
+ void TraceNickListInfo _((int indent, NickList *nicks));
+ void TraceWindowInfo _((int indent, Window *window));
+ 
++void Trace(long area, char *format, ...);
++
+ #endif
+Index: scrollz/source/edit.c
+===================================================================
+--- scrollz.orig/source/edit.c
++++ scrollz/source/edit.c
+@@ -101,6 +101,7 @@ static     void    send_action _((char *, char
+ 
+ TimerList *PendingTimers = (TimerList *) 0;
+ 
++extern void PopLine(void);
+ /* used with input_move_cursor */
+ #define RIGHT 1
+ #define LEFT 0
+Index: scrollz/source/edit2.c
+===================================================================
+--- scrollz.orig/source/edit2.c
++++ scrollz/source/edit2.c
+@@ -195,6 +195,8 @@ static char *celeawaystr=(char *) 0;
+ static time_t CeleAwayTime=0;
+ #endif
+ extern char *CelerityNtfy;
++extern int  DecryptMessage _((char *, char *));
++extern int  EncryptMessage _((char *, char *));
+ 
+ /* Kicks all unopped people from current channel */
+ void LameKick(command,args,subargs)
+Index: scrollz/source/edit3.c
+===================================================================
+--- scrollz.orig/source/edit3.c
++++ scrollz/source/edit3.c
+@@ -96,6 +96,7 @@ extern NickList * find_in_hash _((Channe
+ 
+ extern void dcc_chat _((char *));
+ extern void dcc_close _((char *));
++extern int  DecryptString _((char *, char *, char *, int, int));
+ 
+ extern char *ScrollZver1;
+ extern char *CelerityNtfy;
+Index: scrollz/source/numbers.c
+===================================================================
+--- scrollz.orig/source/numbers.c
++++ scrollz/source/numbers.c
+@@ -104,6 +104,8 @@ extern void HandleStatsD _((char *, char
+ #ifdef CELE
+ extern void HandleTrace _((int, char *, char *, char *, char *, char *, char 
*));
+ #endif
++extern int DecryptMessage _((char *, char *));
++extern int EncryptMessage _((char *, char *));
+ 
+ extern void userhost _((char *, char *, char *));
+ /* ***************** */
+Index: scrollz/source/trace.c
+===================================================================
+--- scrollz.orig/source/trace.c
++++ scrollz/source/trace.c
+@@ -9,6 +9,7 @@
+ #include "ircaux.h"
+ #include "server.h"
+ #include "trace.h"
++#include "output.h"
+ 
+ #ifdef SZTRACE
+ extern char *OpenCreateFile(char *, int);
diff -Nru scrollz-2.2.3/debian/patches/series 
scrollz-2.2.3/debian/patches/series
--- scrollz-2.2.3/debian/patches/series 2021-04-29 17:55:12.000000000 -0600
+++ scrollz-2.2.3/debian/patches/series 2024-04-12 16:15:28.000000000 -0600
@@ -6,3 +6,4 @@
 sys-stat-h.patch
 CVE-2021-29376.patch
 CVE-2021-29376-update.patch
+gcc13.patch

Reply via email to