I got this error while compiling:
/bin/bash ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -c libproxychains.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wp,-MD,.deps/libproxychains.pp -c libproxychains.c -fPIC -DPIC -o .libs/libproxychains.o
libproxychains.c:291: error: conflicting types for 'getnameinfo'
/usr/include/netdb.h:677: note: previous declaration of 'getnameinfo' was here
make[3]: *** [libproxychains.lo] Error 1
make[3]: Leaving directory `/home/sena/documents/temp/proxychains-3.1/proxychains'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/sena/documents/temp/proxychains-3.1/proxychains'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sena/documents/temp/proxychains-3.1'
make: *** [all-recursive-am] Error 2
... and i think i resolved it.
Linux ... 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64 GNU/Linux
in proxychains/libproxychains.c
i changed the function to look like this and it compiled without problems. The same function is declared in /usr/include/netdb.h. Hope someone can use this info. Cheers
//int getnameinfo (const struct sockaddr * sa,
// socklen_t salen, char * host,
// socklen_t hostlen, char * serv,
// socklen_t servlen, unsigned int flags)
// size_t hostlen, char * serv,
// size_t servlen, int flags)
int getnameinfo (__const struct sockaddr *__restrict __sa,
socklen_t __salen, char *__restrict __host,
socklen_t __hostlen, char *__restrict __serv,
socklen_t __servlen, int __flags)
{
int ret = 0;
if(!init_l)
init_lib();
if(!proxychains_resolver) {
ret = true_getnameinfo(__sa,__salen,__host,__hostlen,
__serv,__servlen,__flags);
} else {
if(__hostlen)
strncpy(__host, inet_ntoa(SOCKADDR_2(*__sa)),__hostlen);
if(__servlen)
snprintf(__serv, __servlen,"%d",ntohs(SOCKPORT(*__sa)));
}
PDEBUG("getnameinfo: %s %s\n", __host, __serv);
return ret;
}
Basically just took the declaration from /usr/include/netdb.h
and changed the variables in the function to match, like "__serv".
Cheers