c++tools: Work around a BSD bug in getaddrinfo().
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 13 Mar 2022 16:34:54 +0000 (16:34 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Fri, 18 Mar 2022 15:23:49 +0000 (15:23 +0000)
commit41f01c97153d403fb34eefac245bab8ba472beea
tree93602c1477fc8714346156be5a04ebc74496d78a
parent99fcd602a82e28e1d6a843e5cbe011b570dc81fa
c++tools: Work around a BSD bug in getaddrinfo().

Some versions of the BSD getaddrinfo() call do not work with the specific
input of "0" for the servname entry (a segv results).  Since we are making
the call with a dummy port number, the value is actually no important, other
than it should be in range.  Work around the BSD bug by using "1" instead.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
c++tools/ChangeLog:

* server.cc (accept_from): Use "1" as the dummy port number.
c++tools/server.cc