diff options
author | rofl0r <rofl0r@users.noreply.github.com> | 2021-12-12 20:51:25 +0300 |
---|---|---|
committer | rofl0r <rofl0r@users.noreply.github.com> | 2021-12-12 20:51:25 +0300 |
commit | 063ac681da84fd6e21c131e9fbf0407a2dcf822b (patch) | |
tree | a054d2602c78a7b47777c4f9f200a0f8868d31e8 | |
parent | b83e90dcaf338ec08b30cd018e3a3542886686d9 (diff) |
remove 10 year old workaround for wrong glibc getnameinfo signature
in ce655fdac82ed843b94a1f1a176475e9dbe432c1 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.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/libproxychains.c | 2 | ||||
-rw-r--r-- | src/nameinfo.c | 13 |
3 files changed, 2 insertions, 15 deletions
@@ -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 diff --git a/src/libproxychains.c b/src/libproxychains.c index b67ce83..f3e799c 100644 --- a/src/libproxychains.c +++ b/src/libproxychains.c @@ -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) { diff --git a/src/nameinfo.c b/src/nameinfo.c deleted file mode 100644 index 2a532a2..000000000 --- a/src/nameinfo.c +++ /dev/null @@ -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); -} - |