Commit fc876f22 by Ian Lance Taylor

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
    
    Reviewed-on: https://go-review.googlesource.com/91296

From-SVN: r257299
parent 73b7d28f
71758f9ca1804743afe178f0e2fca489e0217474 b833695618d1a5d9d531f5ba0f9c07c7e35e0073
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -23,7 +23,7 @@ import ( ...@@ -23,7 +23,7 @@ import (
) )
//extern getaddrinfo //extern getaddrinfo
func libc_getaddrinfo(node *byte, service *byte, hints *syscall.Addrinfo, res **syscall.Addrinfo) int func libc_getaddrinfo(node *byte, service *byte, hints *syscall.Addrinfo, res **syscall.Addrinfo) int32
//extern freeaddrinfo //extern freeaddrinfo
func libc_freeaddrinfo(res *syscall.Addrinfo) func libc_freeaddrinfo(res *syscall.Addrinfo)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment