diff options
author | Brent Cook <bcook@openbsd.org> | 2015-09-13 19:06:29 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-09-13 19:06:29 -0500 |
commit | eaa4c1cc8ae7043cd84699cfcbee2e3ae9a7fc33 (patch) | |
tree | e04a9cf7e829a55a4016a236c649a01e59c191d8 /patches/netcat.c.patch | |
parent | 696ba18c6ab02ded424aa4d87712064eba82f804 (diff) | |
download | portable-eaa4c1cc8ae7043cd84699cfcbee2e3ae9a7fc33.tar.gz portable-eaa4c1cc8ae7043cd84699cfcbee2e3ae9a7fc33.tar.bz2 portable-eaa4c1cc8ae7043cd84699cfcbee2e3ae9a7fc33.zip |
a few more linux nc build tweaks
Diffstat (limited to 'patches/netcat.c.patch')
-rw-r--r-- | patches/netcat.c.patch | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch index 1c6565f..9f26ed4 100644 --- a/patches/netcat.c.patch +++ b/patches/netcat.c.patch | |||
@@ -1,5 +1,5 @@ | |||
1 | --- apps/nc/netcat.c.orig Sun Sep 13 08:12:39 2015 | 1 | --- apps/nc/netcat.c.orig Sun Sep 13 08:12:39 2015 |
2 | +++ apps/nc/netcat.c Sun Sep 13 18:56:27 2015 | 2 | +++ apps/nc/netcat.c Sun Sep 13 19:05:00 2015 |
3 | @@ -98,9 +98,13 @@ | 3 | @@ -98,9 +98,13 @@ |
4 | int Dflag; /* sodebug */ | 4 | int Dflag; /* sodebug */ |
5 | int Iflag; /* TCP receive buffer size */ | 5 | int Iflag; /* TCP receive buffer size */ |
@@ -83,7 +83,19 @@ | |||
83 | memset(&ahints, 0, sizeof(struct addrinfo)); | 83 | memset(&ahints, 0, sizeof(struct addrinfo)); |
84 | ahints.ai_family = res0->ai_family; | 84 | ahints.ai_family = res0->ai_family; |
85 | ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; | 85 | ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; |
86 | @@ -887,13 +902,17 @@ | 86 | @@ -865,7 +880,10 @@ |
87 | local_listen(char *host, char *port, struct addrinfo hints) | ||
88 | { | ||
89 | struct addrinfo *res, *res0; | ||
90 | - int s, ret, x = 1; | ||
91 | + int s; | ||
92 | +#ifdef SO_REUSEPORT | ||
93 | + int ret; x = 1; | ||
94 | +#endif | ||
95 | int error; | ||
96 | |||
97 | /* Allow nodename to be null. */ | ||
98 | @@ -887,13 +905,17 @@ | ||
87 | res0->ai_protocol)) < 0) | 99 | res0->ai_protocol)) < 0) |
88 | continue; | 100 | continue; |
89 | 101 | ||
@@ -101,7 +113,7 @@ | |||
101 | 113 | ||
102 | set_common_sockopts(s, res0->ai_family); | 114 | set_common_sockopts(s, res0->ai_family); |
103 | 115 | ||
104 | @@ -1337,11 +1356,13 @@ | 116 | @@ -1337,11 +1359,13 @@ |
105 | { | 117 | { |
106 | int x = 1; | 118 | int x = 1; |
107 | 119 | ||
@@ -115,7 +127,7 @@ | |||
115 | if (Dflag) { | 127 | if (Dflag) { |
116 | if (setsockopt(s, SOL_SOCKET, SO_DEBUG, | 128 | if (setsockopt(s, SOL_SOCKET, SO_DEBUG, |
117 | &x, sizeof(x)) == -1) | 129 | &x, sizeof(x)) == -1) |
118 | @@ -1516,15 +1537,19 @@ | 130 | @@ -1516,15 +1540,19 @@ |
119 | \t-P proxyuser\tUsername for proxy authentication\n\ | 131 | \t-P proxyuser\tUsername for proxy authentication\n\ |
120 | \t-p port\t Specify local port for remote connects\n\ | 132 | \t-p port\t Specify local port for remote connects\n\ |
121 | \t-R CAfile CA bundle\n\ | 133 | \t-R CAfile CA bundle\n\ |