1 |
commit: fb5c1f37eaf25007d39f8bb30d4fde8db9564af1 |
2 |
Author: Craig Andrews <candrews <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 12 20:22:39 2020 +0000 |
4 |
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 12 20:23:02 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb5c1f37 |
7 |
|
8 |
net-misc/proxytunnel: Fix building with -fno-common or gcc-10 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/709404 |
11 |
Package-Manager: Portage-2.3.88, Repoman-2.3.20 |
12 |
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org> |
13 |
|
14 |
.../files/proxytunnel-1.9.1-gcc-10.patch | 128 +++++++++++++++++++++ |
15 |
net-misc/proxytunnel/proxytunnel-1.9.1-r2.ebuild | 3 +- |
16 |
2 files changed, 130 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/net-misc/proxytunnel/files/proxytunnel-1.9.1-gcc-10.patch b/net-misc/proxytunnel/files/proxytunnel-1.9.1-gcc-10.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..a42b8424cca |
21 |
--- /dev/null |
22 |
+++ b/net-misc/proxytunnel/files/proxytunnel-1.9.1-gcc-10.patch |
23 |
@@ -0,0 +1,128 @@ |
24 |
+https://github.com/proxytunnel/proxytunnel/pull/43 |
25 |
+ |
26 |
+From 517650724dc478dd35ac7c7953b4eb700ccb7273 Mon Sep 17 00:00:00 2001 |
27 |
+From: Paul Howarth <paul@××××××××.org> |
28 |
+Date: Wed, 22 Jan 2020 21:44:01 +0000 |
29 |
+Subject: [PATCH] Fix global variable declarations/definitions for GCC 10 |
30 |
+ compatibility |
31 |
+ |
32 |
+This boils down to declaring global variables as "extern" in header files |
33 |
+and defining them in just one place. |
34 |
+ |
35 |
+See https://www.gnu.org/software/gcc/gcc-10/porting_to.html |
36 |
+--- |
37 |
+ Makefile | 1 + |
38 |
+ globals.c | 41 +++++++++++++++++++++++++++++++++++++++++ |
39 |
+ ntlm.h | 4 ++-- |
40 |
+ proxytunnel.h | 16 ++++++++-------- |
41 |
+ 4 files changed, 52 insertions(+), 10 deletions(-) |
42 |
+ create mode 100644 globals.c |
43 |
+ |
44 |
+diff --git a/Makefile b/Makefile |
45 |
+index 57328e8..ecdaa5f 100644 |
46 |
+--- a/Makefile |
47 |
++++ b/Makefile |
48 |
+@@ -63,6 +63,7 @@ OBJ = proxytunnel.o \ |
49 |
+ readpassphrase.o \ |
50 |
+ messages.o \ |
51 |
+ cmdline.o \ |
52 |
++ globals.o \ |
53 |
+ ntlm.o \ |
54 |
+ ptstream.o |
55 |
+ |
56 |
+diff --git a/globals.c b/globals.c |
57 |
+new file mode 100644 |
58 |
+index 0000000..fe19db4 |
59 |
+--- /dev/null |
60 |
++++ b/globals.c |
61 |
+@@ -0,0 +1,41 @@ |
62 |
++/* Proxytunnel - (C) 2001-2008 Jos Visser / Mark Janssen */ |
63 |
++/* Contact: josv@×××.nl / maniac@××××××.nl */ |
64 |
++ |
65 |
++/* |
66 |
++ * This program is free software; you can redistribute it and/or modify |
67 |
++ * it under the terms of the GNU General Public License as published by |
68 |
++ * the Free Software Foundation; either version 2 of the License, or |
69 |
++ * (at your option) any later version. |
70 |
++ * |
71 |
++ * This program is distributed in the hope that it will be useful, |
72 |
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
73 |
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
74 |
++ * GNU General Public License for more details. |
75 |
++ * |
76 |
++ * You should have received a copy of the GNU General Public License |
77 |
++ * along with this program; if not, write to the Free Software |
78 |
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
79 |
++ */ |
80 |
++ |
81 |
++/* globals.c */ |
82 |
++ |
83 |
++#include "proxytunnel.h" |
84 |
++ |
85 |
++/* Globals */ |
86 |
++char *program_name; /* Guess what? */ |
87 |
++int i_am_daemon; /* Also... */ |
88 |
++ |
89 |
++PTSTREAM *stunnel; /* stream representing the socket from us to proxy */ |
90 |
++PTSTREAM *std; /* stream representing stdin/stdout */ |
91 |
++ |
92 |
++/* |
93 |
++ * All the command line options |
94 |
++ */ |
95 |
++struct gengetopt_args_info args_info; |
96 |
++ |
97 |
++char buf[SIZE]; /* Data transfer buffer */ |
98 |
++ |
99 |
++char ntlm_type1_buf[160]; |
100 |
++char ntlm_type3_buf[4096]; |
101 |
++ |
102 |
++// vim:noexpandtab:ts=4 |
103 |
+diff --git a/ntlm.h b/ntlm.h |
104 |
+index f919368..01a6434 100644 |
105 |
+--- a/ntlm.h |
106 |
++++ b/ntlm.h |
107 |
+@@ -26,8 +26,8 @@ void build_ntlm2_response(); |
108 |
+ |
109 |
+ extern int ntlm_challenge; |
110 |
+ |
111 |
+-char ntlm_type1_buf[160]; |
112 |
+-char ntlm_type3_buf[4096]; |
113 |
++extern char ntlm_type1_buf[160]; |
114 |
++extern char ntlm_type3_buf[4096]; |
115 |
+ |
116 |
+ |
117 |
+ // Below are the flag definitions. |
118 |
+diff --git a/proxytunnel.h b/proxytunnel.h |
119 |
+index 593cd7e..aa09a4b 100644 |
120 |
+--- a/proxytunnel.h |
121 |
++++ b/proxytunnel.h |
122 |
+@@ -46,21 +46,21 @@ char * readpassphrase(const char *, char *, size_t, int); |
123 |
+ char * getpass_x(const char *format, ...); |
124 |
+ |
125 |
+ /* Globals */ |
126 |
+-int read_fd; /* The file descriptor to read from */ |
127 |
+-int write_fd; /* The file destriptor to write to */ |
128 |
+-char *program_name; /* Guess what? */ |
129 |
+-int i_am_daemon; /* Also... */ |
130 |
++extern int read_fd; /* The file descriptor to read from */ |
131 |
++extern int write_fd; /* The file descriptor to write to */ |
132 |
++extern char *program_name; /* Guess what? */ |
133 |
++extern int i_am_daemon; /* Also... */ |
134 |
+ |
135 |
+-PTSTREAM *stunnel; /* stream representing the socket from us to proxy */ |
136 |
+-PTSTREAM *std; /* stream representing stdin/stdout */ |
137 |
++extern PTSTREAM *stunnel; /* stream representing the socket from us to proxy */ |
138 |
++extern PTSTREAM *std; /* stream representing stdin/stdout */ |
139 |
+ |
140 |
+ /* |
141 |
+ * All the command line options |
142 |
+ */ |
143 |
+-struct gengetopt_args_info args_info; |
144 |
++extern struct gengetopt_args_info args_info; |
145 |
+ |
146 |
+ #define SIZE 65536 |
147 |
+-char buf[SIZE]; /* Data transfer buffer */ |
148 |
++extern char buf[SIZE]; /* Data transfer buffer */ |
149 |
+ |
150 |
+ /* |
151 |
+ * Small MAX macro |
152 |
|
153 |
diff --git a/net-misc/proxytunnel/proxytunnel-1.9.1-r2.ebuild b/net-misc/proxytunnel/proxytunnel-1.9.1-r2.ebuild |
154 |
index eaf7123e2b0..a8815f6b96e 100644 |
155 |
--- a/net-misc/proxytunnel/proxytunnel-1.9.1-r2.ebuild |
156 |
+++ b/net-misc/proxytunnel/proxytunnel-1.9.1-r2.ebuild |
157 |
@@ -1,4 +1,4 @@ |
158 |
-# Copyright 1999-2018 Gentoo Authors |
159 |
+# Copyright 1999-2020 Gentoo Authors |
160 |
# Distributed under the terms of the GNU General Public License v2 |
161 |
|
162 |
EAPI=7 |
163 |
@@ -22,6 +22,7 @@ BDEPEND="virtual/pkgconfig" |
164 |
DOCS=( CHANGES CREDITS INSTALL KNOWN_ISSUES LICENSE.txt README RELNOTES TODO ) |
165 |
PATCHES=( |
166 |
"${FILESDIR}"/${PN}-allowTLS.patch |
167 |
+ "${FILESDIR}"/${P}-gcc-10.patch |
168 |
) |
169 |
|
170 |
if [[ ${PV} == *9999 ]] ; then |