diff options
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/samba_util.h | 1 | ||||
-rw-r--r-- | lib/util/system.c | 19 |
2 files changed, 0 insertions, 20 deletions
diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h index 13fe831995..a3aa220c40 100644 --- a/lib/util/samba_util.h +++ b/lib/util/samba_util.h @@ -138,7 +138,6 @@ _PUBLIC_ int sys_getnameinfo(const struct sockaddr *psa, char *service, size_t servlen, int flags); -_PUBLIC_ int sys_connect(int fd, const struct sockaddr * addr); /* The following definitions come from lib/util/genrand.c */ /** diff --git a/lib/util/system.c b/lib/util/system.c index ab0f1dc6c4..a7141bf9b0 100644 --- a/lib/util/system.c +++ b/lib/util/system.c @@ -123,22 +123,3 @@ _PUBLIC_ int sys_getnameinfo(const struct sockaddr *psa, } return getnameinfo(psa, salen, host, hostlen, service, servlen, flags); } - -_PUBLIC_ int sys_connect(int fd, const struct sockaddr * addr) -{ - socklen_t salen = (socklen_t)-1; - - if (addr->sa_family == AF_INET) { - salen = sizeof(struct sockaddr_in); - } else if (addr->sa_family == AF_UNIX) { - salen = sizeof(struct sockaddr_un); - } -#if defined(HAVE_IPV6) - else if (addr->sa_family == AF_INET6) { - salen = sizeof(struct sockaddr_in6); - } -#endif - - return connect(fd, addr, salen); -} - |