--- a/src/libproxychains.c
+++ b/src/libproxychains.c
@@ -587,7 +587,7 @@
 	return !memcmp(a->s6_addr, "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12);
 }
 
-HOOKFUNC(int, connect, int sock, const struct sockaddr *addr, unsigned int len) {
+HOOKFUNC(int, connect, int sock, const struct sockaddr *addr, socklen_t len) {
 	INIT();
 	PFUNC();
 
@@ -729,8 +729,8 @@
 }
 
 HOOKFUNC(int, getnameinfo, const struct sockaddr *sa, socklen_t salen,
-	           char *host, socklen_t hostlen, char *serv,
-	           socklen_t servlen, int flags)
+	           char *host, size_t hostlen, char *serv,
+	           size_t servlen, int flags)
 {
 	INIT();
 	PFUNC();
