From a57721d14642291696be4ffd5d8bb0915fbe861b Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 8 Jul 2019 16:02:56 -0700 Subject: bind/connect cleanup. Rename the existing xbind/xconnect to xbindany/xconnectany, to make room for new xbind/xconnect that are more like 'x' versions of the regular bind and connect. Move explicit bind/connect callers over to xbind/xconnect. Of the affected commands, only netcat is actually used by Android. It was the most recent patch to netcat that made the lack of a more traditional xbind/xconnect apparent. --- toys/other/nbd_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/other') diff --git a/toys/other/nbd_client.c b/toys/other/nbd_client.c index fcd0fca8..ad3440af 100644 --- a/toys/other/nbd_client.c +++ b/toys/other/nbd_client.c @@ -52,7 +52,7 @@ void nbd_client_main(void) // Find and connect to server - sock = xconnect(xgetaddrinfo(host, port, AF_UNSPEC, SOCK_STREAM, 0, 0)); + sock = xconnectany(xgetaddrinfo(host, port, AF_UNSPEC, SOCK_STREAM, 0, 0)); temp = 1; setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &temp, sizeof(int)); -- cgit v1.2.3