1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

net/echoping: fix build with -fno-common (clang 11 and gcc 10)

PORTREVISION not bumped as it fixes build for FreeBSD 13.

Reported by:	pkg-fallout
This commit is contained in:
Eugene Grosbein 2020-08-20 09:06:14 +00:00
parent a68e1ff133
commit 16b5a48d6c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=545509
4 changed files with 92 additions and 2 deletions

View File

@ -0,0 +1,25 @@
--- echoping.c.orig 2020-08-20 15:47:00 UTC
+++ echoping.c
@@ -38,6 +38,22 @@ struct result results[MAX_ITERATIONS];
struct timeval good_results[MAX_ITERATIONS];
extern int tvcmp();
+boolean timeout_flag;
+static char *server;
+#ifdef LIBIDN
+static char *locale_server, *ace_server, *utf8_server;
+#endif
+
+static init_f plugin_init;
+static start_f plugin_start;
+static start_raw_f plugin_raw_start;
+static execute_f plugin_execute;
+static execute_f plugin_execute;
+static terminate_f plugin_terminate;
+
+struct timeval null_timeval;
+static struct timeval max_timeval;
+
int
main(argc, argv)
int argc;

View File

@ -0,0 +1,45 @@
--- echoping.h.orig 2020-08-20 15:39:43 UTC
+++ echoping.h
@@ -121,7 +121,6 @@ struct result
struct timeval timevalue;
};
-boolean timeout_flag;
struct echoping_struct
{
boolean udp; /* Use the UDP protocol (TCP is the default) */
@@ -136,21 +135,15 @@ typedef struct echoping_struct echoping_options;
/* 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;
typedef void (*start_f) (struct addrinfo *);
-start_f plugin_start;
typedef void (*start_raw_f) ();
-start_raw_f plugin_raw_start;
typedef int (*execute_f) ();
-execute_f plugin_execute;
typedef void (*terminate_f) ();
-terminate_f plugin_terminate;
#endif
#endif
-struct timeval null_timeval;
-struct timeval max_timeval;
+extern struct timeval null_timeval;
#define ECHO_TCP_PORT "echo"
#define DISCARD_TCP_PORT "discard"
@@ -172,11 +165,6 @@ struct timeval max_timeval;
#define USE_SMTP 6
#define CHARGENERATED " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefg";
-
-char *server;
-#ifdef LIBIDN
-char *locale_server, *ace_server, *utf8_server;
-#endif
/* My functions */

View File

@ -1,6 +1,15 @@
--- http.c.orig 2015-06-03 13:06:16 UTC
--- http.c.orig 2019-12-29 10:14:41 UTC
+++ http.c
@@ -113,6 +113,8 @@ read_from_server(CHANNEL fs, short ssl,
@@ -6,7 +6,7 @@
#include "HTParse.h"
-char big_recvline[MAXTOREAD];
+static char big_recvline[MAXTOREAD];
char *
make_http_sendline(char *url, char *host, int port, int nocache)
@@ -113,6 +113,8 @@ read_from_server(CHANNEL fs, short ssl, boolean accept
/* 204 No Content is not an error, message body is empty by definition, see RFC 2616 */
if (reply_code == 204)
return 0; /* zero bytes is correct */

View File

@ -0,0 +1,11 @@
--- smtp.c.orig 2019-12-29 10:14:41 UTC
+++ smtp.c
@@ -8,7 +8,7 @@
#ifdef SMTP
-char big_recvline[MAXTOREAD];
+static char big_recvline[MAXTOREAD];
int
smtp_read_response_from_server(FILE * fs)