Package: echoping Version: 6.0.2-10 Followup-For: Bug #957161 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu hirsute ubuntu-patch X-Debbugs-Cc: lo...@ubuntu.com Control: tags -1 patch
Hi, In Ubuntu, the attached patch was applied to achieve the following: * d/p/gcc-10.patch: Fix FTBFS with GCC 10. Thanks for considering the patch. Logan
diff -Nru echoping-6.0.2/debian/patches/gcc-10.patch echoping-6.0.2/debian/patches/gcc-10.patch --- echoping-6.0.2/debian/patches/gcc-10.patch 1969-12-31 19:00:00.000000000 -0500 +++ echoping-6.0.2/debian/patches/gcc-10.patch 2021-01-07 19:08:48.000000000 -0500 @@ -0,0 +1,112 @@ +--- a/echoping.h ++++ b/echoping.h +@@ -121,7 +121,7 @@ + struct timeval timevalue; + }; + +-boolean timeout_flag; ++extern boolean timeout_flag; + struct echoping_struct + { + boolean udp; /* Use the UDP protocol (TCP is the default) */ +@@ -136,21 +136,21 @@ + /* Initializes the plugin with its arguments. Returns the port name or number or NULL if the plugin wants to use the raw interface. */ + typedef char *(*init_f) (const int argc, const char **argv, + const echoping_options global_options); +-init_f plugin_init; ++extern init_f plugin_init; + typedef void (*start_f) (struct addrinfo *); +-start_f plugin_start; ++extern start_f plugin_start; + typedef void (*start_raw_f) (); +-start_raw_f plugin_raw_start; ++extern start_raw_f plugin_raw_start; + typedef int (*execute_f) (); +-execute_f plugin_execute; ++extern execute_f plugin_execute; + typedef void (*terminate_f) (); +-terminate_f plugin_terminate; ++extern terminate_f plugin_terminate; + #endif + + #endif + +-struct timeval null_timeval; +-struct timeval max_timeval; ++extern struct timeval null_timeval; ++extern struct timeval max_timeval; + + #define ECHO_TCP_PORT "echo" + #define DISCARD_TCP_PORT "discard" +@@ -173,9 +173,9 @@ + + #define CHARGENERATED " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefg"; + +-char *server; ++extern char *server; + #ifdef LIBIDN +-char *locale_server, *ace_server, *utf8_server; ++extern char *locale_server, *ace_server, *utf8_server; + #endif + + /* My functions */ +@@ -233,6 +233,8 @@ + + extern boolean timeout_flag; + ++extern char big_recvline[MAXTOREAD]; ++ + #include "compilation.h" + + #ifndef HEADER_INCLUDED +--- a/echoping.c ++++ b/echoping.c +@@ -38,6 +38,26 @@ + struct timeval good_results[MAX_ITERATIONS]; + extern int tvcmp(); + ++boolean timeout_flag; ++ ++#ifndef IN_PLUGIN ++init_f plugin_init; ++start_f plugin_start; ++start_raw_f plugin_raw_start; ++execute_f plugin_execute; ++terminate_f plugin_terminate; ++#endif ++ ++struct timeval null_timeval; ++struct timeval max_timeval; ++ ++char *server; ++#ifdef LIBIDN ++char *locale_server, *ace_server, *utf8_server; ++#endif ++ ++char big_recvline[MAXTOREAD]; ++ + int + main(argc, argv) + int argc; +--- a/http.c ++++ b/http.c +@@ -6,8 +6,6 @@ + #include "HTParse.h" + + +-char big_recvline[MAXTOREAD]; +- + char * + make_http_sendline(char *url, char *host, int port, int nocache) + { +--- a/smtp.c ++++ b/smtp.c +@@ -8,8 +8,6 @@ + + #ifdef SMTP + +-char big_recvline[MAXTOREAD]; +- + int + smtp_read_response_from_server(FILE * fs) + { diff -Nru echoping-6.0.2/debian/patches/series echoping-6.0.2/debian/patches/series --- echoping-6.0.2/debian/patches/series 2018-10-14 16:24:57.000000000 -0400 +++ echoping-6.0.2/debian/patches/series 2021-01-07 19:08:48.000000000 -0500 @@ -1,3 +1,4 @@ +gcc-10.patch 006_reproducible-build.diff 005_gnutls34.diff 004-only-append-port-number-if-port-is-not-80.diff