diff options
author | Eugene Grosbein <eugen@FreeBSD.org> | 2020-08-20 09:06:14 +0000 |
---|---|---|
committer | Eugene Grosbein <eugen@FreeBSD.org> | 2020-08-20 09:06:14 +0000 |
commit | 16b5a48d6cbdd027ec8a7a1652fb3402c0636625 (patch) | |
tree | e58931760dcfa435a5ee8c054e7a24b93d75d3bc /net/echoping | |
parent | a68e1ff13376a2268c77f7d667292f0f5ec9c6c8 (diff) | |
download | ports-16b5a48d6cbdd027ec8a7a1652fb3402c0636625.tar.gz ports-16b5a48d6cbdd027ec8a7a1652fb3402c0636625.zip |
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
Notes
Notes:
svn path=/head/; revision=545509
Diffstat (limited to 'net/echoping')
-rw-r--r-- | net/echoping/files/patch-echoping.c | 25 | ||||
-rw-r--r-- | net/echoping/files/patch-echoping.h | 45 | ||||
-rw-r--r-- | net/echoping/files/patch-http.c | 13 | ||||
-rw-r--r-- | net/echoping/files/patch-smtp.c | 11 |
4 files changed, 92 insertions, 2 deletions
diff --git a/net/echoping/files/patch-echoping.c b/net/echoping/files/patch-echoping.c new file mode 100644 index 000000000000..d2b246599a41 --- /dev/null +++ b/net/echoping/files/patch-echoping.c @@ -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; diff --git a/net/echoping/files/patch-echoping.h b/net/echoping/files/patch-echoping.h new file mode 100644 index 000000000000..6614c1d56d6e --- /dev/null +++ b/net/echoping/files/patch-echoping.h @@ -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 */ + diff --git a/net/echoping/files/patch-http.c b/net/echoping/files/patch-http.c index e5960167d865..d3cb1d14c52f 100644 --- a/net/echoping/files/patch-http.c +++ b/net/echoping/files/patch-http.c @@ -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 */ diff --git a/net/echoping/files/patch-smtp.c b/net/echoping/files/patch-smtp.c new file mode 100644 index 000000000000..2f9a17051041 --- /dev/null +++ b/net/echoping/files/patch-smtp.c @@ -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) |