Skip to content
Snippets Groups Projects
  • Iain Sandoe's avatar
    41f01c97
    c++tools: Work around a BSD bug in getaddrinfo(). · 41f01c97
    Iain Sandoe authored
    
    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: default avatarIain Sandoe <iain@sandoe.co.uk>
    
    c++tools/ChangeLog:
    
    	* server.cc (accept_from): Use "1" as the dummy port number.
    41f01c97
    History
    c++tools: Work around a BSD bug in getaddrinfo().
    Iain Sandoe authored
    
    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: default avatarIain Sandoe <iain@sandoe.co.uk>
    
    c++tools/ChangeLog:
    
    	* server.cc (accept_from): Use "1" as the dummy port number.