X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=libbb%2Fxconnect.c;h=39052b87b6d584ce29e6fc8aa22d0a10f3910dd5;hb=7011dd0e06334b01533553a654ecb044ccf2eed7;hp=1e5799e516c53ef84a5ced00878ff7d57542fe4c;hpb=6417564eebe6b9591d9c001160d201194bd5e24a;p=oweals%2Fbusybox.git diff --git a/libbb/xconnect.c b/libbb/xconnect.c index 1e5799e51..39052b87b 100644 --- a/libbb/xconnect.c +++ b/libbb/xconnect.c @@ -61,8 +61,8 @@ void bb_lookup_host(struct sockaddr_in *s_in, const char *host) int xconnect(struct sockaddr_in *s_addr) { - int s = socket(AF_INET, SOCK_STREAM, 0); - if (connect(s, (struct sockaddr_in *)s_addr, sizeof(struct sockaddr_in)) < 0) + int s = bb_xsocket(AF_INET, SOCK_STREAM, 0); + if (connect(s, (struct sockaddr *)s_addr, sizeof(struct sockaddr_in)) < 0) { if (ENABLE_FEATURE_CLEAN_UP) close(s); bb_perror_msg_and_die("Unable to connect to remote host (%s)",