Package: netdiag
Followup-For: Bug #1066694
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: Add multiple missing headers and
    function prototypes.  Closes LP: #2060901.


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 -u netdiag-1.2/debian/patches/series netdiag-1.2/debian/patches/series
--- netdiag-1.2/debian/patches/series
+++ netdiag-1.2/debian/patches/series
@@ -9,3 +9,4 @@
 gcc-10.diff
 pcap_init.diff
 gcc12.patch
+gcc13.patch
only in patch2:
unchanged:
--- netdiag-1.2.orig/debian/patches/gcc13.patch
+++ netdiag-1.2/debian/patches/gcc13.patch
@@ -0,0 +1,106 @@
+Description: Add multiple missing headers and function prototypes
+Author: Zixing Liu <zixing....@canonical.com>
+Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066694
+Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/netdiag/+bug/2060901
+Forwarded: no
+Last-Update: 2024-04-10
+Index: netdiag/netwatch-1.3.1-2/netwatch.h
+===================================================================
+--- netdiag.orig/netwatch-1.3.1-2/netwatch.h
++++ netdiag/netwatch-1.3.1-2/netwatch.h
+@@ -38,6 +38,10 @@
+ #define SN_PROT_LOOP          164     /* Pseudo protocol for Loopback */
+ 
+ #include <sys/types.h>
++#include <time.h>
++#include <ctype.h>
++#include <unistd.h>
++#include <stdlib.h>
+ #include "config.h"
+ /*
+ #ifdef NETINET_SUPP_socket
+@@ -84,6 +88,11 @@ typedef unsigned short  sa_family_t;
+ 
+ 
+ #include "core.h"
++int dokeyin(int force);
++int doeth();
++int gh (int opt);
++void setuphelp();
++void uthread_wait(long usec);
+ void dispdata(int errnum);
+ void services();
+ void usage(char *arg);
+Index: netdiag/statnet-3.8/statnet.c
+===================================================================
+--- netdiag.orig/statnet-3.8/statnet.c
++++ netdiag/statnet-3.8/statnet.c
+@@ -7,7 +7,6 @@
+ #define MAIN_LINE 1
+ 
+ #include <values.h>
+-#include "stat.h"
+ 
+ #include "curs.h"
+ #include <signal.h>
+@@ -33,6 +32,8 @@
+ #endif
+ 
+ #include <sys/shm.h>
++#include <curses.h>
++#include "stat.h"
+ 
+ #define Stringify(X)  #X
+ #define Quoteify(X)   Stringify(X)
+Index: netdiag/statnet-3.8/getservent.c
+===================================================================
+--- netdiag.orig/statnet-3.8/getservent.c
++++ netdiag/statnet-3.8/getservent.c
+@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)getservent.c
+ #endif /* LIBC_SCCS and not lint */
+ 
+ #include "inetprivate.h"
+-
++#include <stdlib.h>
+ #define       MAXALIASES      35
+ 
+ static char SERVDB[] = _PATH_SERVICES;
+Index: netdiag/statnet-3.8/itstime.c
+===================================================================
+--- netdiag.orig/statnet-3.8/itstime.c
++++ netdiag/statnet-3.8/itstime.c
+@@ -8,7 +8,7 @@
+ #include "stat.h"
+ #include <errno.h>
+ #include <signal.h>
+-
++#include <unistd.h>
+ extern struct StatMemStruct *StatMem; /* pointer to shared memory segment */
+ 
+ void itstime (int errnum)
+Index: netdiag/statnet-3.8/stat.h
+===================================================================
+--- netdiag.orig/statnet-3.8/stat.h
++++ netdiag/statnet-3.8/stat.h
+@@ -197,7 +197,7 @@ void set_null ( struct StatMemStruct *St
+ void services ();
+ void stat_delta ( struct StatMemStruct *New, struct StatMemStruct *Prev, 
struct StatMemStruct *Delta );
+ void usage (char *arg);
+-#ifdef WINDOW
++#if CURSES_H
+ void win_show_stat( WINDOW *win, int X, int Y, int noframes, struct Tally 
*Now_ts, struct Tally *Prev_ts, struct Tally *Delta_ts, short rewrite_labels, 
short *update_labels, void *show_labels );
+ #endif
+ 
+@@ -226,10 +226,10 @@ void tally_ntoh ( int bytecode,
+         struct Tally *New_t, 
+         struct Tally *Prev_t );
+ 
+-#ifdef WINDOW
++#if CURSES_H
+ void tally_label ( struct Tally *Now_ts, WINDOW *win, int width, int height );
+ #endif
+-
++int tally (int type_wanted, struct Tally *tally);
+ 
+ /* Now some redefinitions of <netdb.h> stuff.  With the Berkeley notice... */
+ 

Reply via email to