remove 10 year old workaround for wrong glibc getnameinfo signature

in ce655fdac8 the getnameinfo function
was factored into a separate TU to prevent its POSIX signature from
colliding with GLIBC's wrong prototype. since this has been fixed
in GLIBC 10 years ago, it should be safe by now.
undoing the workaround has the advantage that all hooked functions
are now available in the same place, which is a prerequisite for
a change i'm about to commit.

if it turns out there's still systems in use that use the old GLIBC
version with the wrong prototype, we can add a configure check
dealing with it.
This commit is contained in:
rofl0r 2021-12-12 17:51:25 +00:00
parent b83e90dcaf
commit 063ac681da
3 changed files with 2 additions and 15 deletions

View File

@ -19,7 +19,7 @@ DOBJS = src/daemon/hsearch.o \
src/daemon/sblist.o src/daemon/sblist_delete.o \
src/daemon/daemon.o src/daemon/udpserver.o
LOBJS = src/nameinfo.o src/version.o \
LOBJS = src/version.o \
src/core.o src/common.o src/libproxychains.o \
src/allocator_thread.o src/rdns.o \
src/hostsreader.o src/hash.o src/debug.o

View File

@ -689,7 +689,7 @@ void freeaddrinfo(struct addrinfo *res) {
proxy_freeaddrinfo(res);
}
int pc_getnameinfo(const struct sockaddr *sa, socklen_t salen,
int getnameinfo(const struct sockaddr *sa, socklen_t salen,
char *host, socklen_t hostlen, char *serv,
socklen_t servlen, int flags)
{

View File

@ -1,13 +0,0 @@
#include <sys/socket.h>
extern int pc_getnameinfo(const void *sa, socklen_t salen,
char *host, socklen_t hostlen, char *serv,
socklen_t servlen, int flags);
int getnameinfo(const void *sa, socklen_t salen,
char *host, socklen_t hostlen, char *serv,
socklen_t servlen, int flags) {
return pc_getnameinfo(sa, salen, host, hostlen, serv, servlen, flags);
}