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/net/ping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/net/ping.c') diff --git a/toys/net/ping.c b/toys/net/ping.c index 81dca99f..9ae7c856 100644 --- a/toys/net/ping.c +++ b/toys/net/ping.c @@ -155,7 +155,7 @@ void ping_main(void) } xexit(); } - if (TT.I && bind(TT.sock, sa, sizeof(srcaddr))) perror_exit("bind"); + if (TT.I) xbind(TT.sock, sa, sizeof(srcaddr)); if (toys.optflags&FLAG_m) { int mark = TT.m; -- cgit v1.2.3