1 |
commit: 75744ca5cd171495eb53f1a2e58aa3df2405ea73 |
2 |
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at> |
3 |
AuthorDate: Sat Jan 21 11:37:32 2023 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 1 01:13:41 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75744ca5 |
7 |
|
8 |
net-analyzer/openbsd-netcat: remove unused patch |
9 |
|
10 |
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/29202 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
.../files/openbsd-netcat-1.190-darwin.patch | 86 ---------------------- |
15 |
1 file changed, 86 deletions(-) |
16 |
|
17 |
diff --git a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch |
18 |
deleted file mode 100644 |
19 |
index 72a3fe8ed9f5..000000000000 |
20 |
--- a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch |
21 |
+++ /dev/null |
22 |
@@ -1,86 +0,0 @@ |
23 |
-Allow compilation on Darwin |
24 |
- |
25 |
-diff --git a/netcat.c b/netcat.c |
26 |
-index a0fb51b..bbb5dd1 100644 |
27 |
---- a/netcat.c |
28 |
-+++ b/netcat.c |
29 |
-@@ -51,11 +51,16 @@ |
30 |
- # include <bsd/readpassphrase.h> |
31 |
- #endif |
32 |
- |
33 |
-+#ifndef IPTOS_LOWCOST |
34 |
-+# define IPTOS_LOWCOST 0x02 |
35 |
-+#endif |
36 |
- #ifndef IPTOS_LOWDELAY |
37 |
- # define IPTOS_LOWDELAY 0x10 |
38 |
- # define IPTOS_THROUGHPUT 0x08 |
39 |
- # define IPTOS_RELIABILITY 0x04 |
40 |
--# define IPTOS_LOWCOST 0x02 |
41 |
- # define IPTOS_MINCOST IPTOS_LOWCOST |
42 |
- #endif /* IPTOS_LOWDELAY */ |
43 |
-+#ifndef SOCK_CLOEXEC |
44 |
-+# define SOCK_CLOEXEC 0 |
45 |
-+#endif |
46 |
- |
47 |
-@@ -108,8 +110,9 @@ |
48 |
- # include <tls.h> |
49 |
- #endif |
50 |
- #include <unistd.h> |
51 |
--#include <bsd/stdlib.h> |
52 |
--#include <bsd/string.h> |
53 |
-+#include <stdlib.h> |
54 |
-+#include <string.h> |
55 |
-+#include <ctype.h> |
56 |
- |
57 |
- #include "atomicio.h" |
58 |
- |
59 |
-@@ -814,9 +814,8 @@ |
60 |
- # endif |
61 |
- } else { |
62 |
- len = sizeof(cliaddr); |
63 |
-- connfd = accept4(s, (struct sockaddr *)&cliaddr, |
64 |
-- &len, SOCK_NONBLOCK); |
65 |
-- if (connfd == -1) { |
66 |
-+ connfd = accept(s, (struct sockaddr *)&cliaddr, &len); |
67 |
-+ if (connfd == -1 || fcntl(connfd, F_SETFL, O_NONBLOCK) == -1) { |
68 |
- /* For now, all errnos are fatal */ |
69 |
- err(1, "accept"); |
70 |
- } |
71 |
-@@ -1100,6 +1099,8 @@ |
72 |
- return -1; |
73 |
- } |
74 |
- } |
75 |
-+ if (fcntl(s, F_SETFD, FD_CLOEXEC) == -1) |
76 |
-+ return -1; |
77 |
- |
78 |
- memset(&s_un, 0, sizeof(struct sockaddr_un)); |
79 |
- s_un.sun_family = AF_UNIX; |
80 |
-@@ -1174,9 +1175,13 @@ |
81 |
- port, gai_strerror(error)); |
82 |
- |
83 |
- for (res = res0; res; res = res->ai_next) { |
84 |
-- if ((s = socket(res->ai_family, res->ai_socktype | |
85 |
-- SOCK_NONBLOCK, res->ai_protocol)) < 0) |
86 |
-+ if ((s = socket(res->ai_family, res->ai_socktype, |
87 |
-+ res->ai_protocol)) < 0) |
88 |
-+ continue; |
89 |
-+ if (fcntl(s, F_SETFL, O_NONBLOCK) == -1) { |
90 |
-+ close(s); |
91 |
- continue; |
92 |
-+ } |
93 |
- |
94 |
- /* Bind to a local port or source address if specified. */ |
95 |
- if (sflag || pflag) { |
96 |
-diff --git a/socks.c b/socks.c |
97 |
-index 9068f39..68b68e3 100644 |
98 |
---- a/socks.c |
99 |
-+++ b/socks.c |
100 |
-@@ -38,7 +38,7 @@ |
101 |
- #include <string.h> |
102 |
- #include <unistd.h> |
103 |
- #include <resolv.h> |
104 |
--#include <bsd/readpassphrase.h> |
105 |
-+#include <readpassphrase.h> |
106 |
- #include "atomicio.h" |
107 |
- |
108 |
- #define SOCKS_PORT "1080" |