some platforms are very picky about the third argument passed to bind().
authorroot <root@test1n1.VSOFS1.COM>
Thu, 4 Dec 2008 23:33:38 +0000 (10:33 +1100)
committerroot <root@test1n1.VSOFS1.COM>
Thu, 4 Dec 2008 23:33:38 +0000 (10:33 +1100)
commitbf6715340258a5cf3b49aa05c38b1fc02a78a2da
treee7aae5693a772bac9bd1746b59811ec2975d00d9
parent9f2de14fb8a1568b88063fe2ee3b1141c6ee885d
some platforms are very picky about the third argument passed to bind().
and would complain if sa.family is AF_INET and the third argument is not exactly the size of a sockaddr_in.

We used to pass a union containing both a sockaddr_in and a sockaddr_in6  which would mean that on those platforms bind() would fail since the passed structure for AF_INET would be too big.

Thus we need to set and pass the appropriate size to bind. At the same time for thos eplatforms we can also set sin[6]_size to the expected size.
(bind() on those platforms were isurprisingly perfectly ok with sin_len was "too big")

(This used to be ctdb commit 5d3018c37179966f75183d9a98790eaaaf1d2cfc)
ctdb/tcp/tcp_connect.c