net: declare lib_getaddrinfo as returning int32

Otherwise on a 64-bit system we will read the 32-bit value as a 64-bit
value.  Since getaddrinfo returns negative numbers as error values,
these will be interpreted as numbers like 0xfffffffe rather than -2,
and the comparisons with values like syscall.EAI_NONAME will fail.

Fixes golang/go#23645

Change-Id: I769b3fa9086976ef363cd26a909591bdad05f298
Reviewed-on: https://go-review.googlesource.com/91296
Reviewed-by: Than McIntosh <thanm@google.com>
1 file changed