Hi,

I've written a patch.

After that, I've seen Reiner Herrmann already posted a working solution.

It's mostly the same fix but slightly different.
Please consider my version as an alternative. IMAO mine is preferable ;)

Regards,

-- 
Antoni Villalonga
https://friki.cat/
Description: Fix ftbfs with GCC-10
Forwarded: no
Author: Antoni Villalonga <ant...@friki.cat>
Last-Update: 2020-08-05
--- a/proxychains/core.h
+++ b/proxychains/core.h
@@ -68,27 +68,27 @@
 
 
 typedef int (*connect_t)(int, const struct sockaddr *, socklen_t);
-connect_t true_connect;
+extern connect_t true_connect;
 
 typedef struct hostent* (*gethostbyname_t)(const char *);
-gethostbyname_t true_gethostbyname;
+extern gethostbyname_t true_gethostbyname;
 
 typedef int (*getaddrinfo_t)(const char *, const char *,
 		const struct addrinfo *,
 		struct addrinfo **);
-getaddrinfo_t true_getaddrinfo;
+extern getaddrinfo_t true_getaddrinfo;
 
 typedef int (*freeaddrinfo_t)(struct addrinfo *);
-freeaddrinfo_t true_freeaddrinfo;
+extern freeaddrinfo_t true_freeaddrinfo;
 
 typedef int (*getnameinfo_t) (const struct sockaddr *,
 		socklen_t, char *,
 		socklen_t, char *,
 		socklen_t, unsigned int);
-getnameinfo_t true_getnameinfo;
+extern getnameinfo_t true_getnameinfo;
 
 typedef struct hostent *(*gethostbyaddr_t) (const void *, socklen_t, int);
-gethostbyaddr_t true_gethostbyaddr;
+extern gethostbyaddr_t true_gethostbyaddr;
 
 int proxy_getaddrinfo(const char *node, const char *service,
 		                const struct addrinfo *hints,
--- a/proxychains/libproxychains.c
+++ b/proxychains/libproxychains.c
@@ -81,6 +81,12 @@
 	unsigned int *proxy_count,
 	chain_type *ct,
 	my_network *subnets);
+connect_t true_connect;
+gethostbyname_t true_gethostbyname;
+getaddrinfo_t true_getaddrinfo;
+freeaddrinfo_t true_freeaddrinfo;
+getnameinfo_t true_getnameinfo;
+gethostbyaddr_t true_gethostbyaddr;
 
 static void init_lib()
 {

Reply via email to