Fix compilation of wxGethostbyname_r() and wxGethostbyaddr_r() under AIX.

gethostbyname_r() and gethostbyaddr_r() functions return int, not hostent*,
under AIX so assign their return value to the error indicator.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-10-31 14:24:51 +00:00
parent 5fe43b6017
commit 6677f122a1

View File

@@ -273,8 +273,8 @@ hostent *wxGethostbyname_r(const char *hostname,
#elif defined(HAVE_FUNC_GETHOSTBYNAME_R_5)
he = gethostbyname_r(hostname, h, buffer, size, err);
#elif defined(HAVE_FUNC_GETHOSTBYNAME_R_3)
he = gethostbyname_r(hostname, h, &buffer);
*err = h_errno;
*err = gethostbyname_r(hostname, h, &buffer);
he = h;
#elif defined(HAVE_GETHOSTBYNAME)
wxLOCK_GETBY_MUTEX(name);
@@ -304,8 +304,8 @@ hostent *wxGethostbyaddr_r(const char *addr_buf,
#elif defined(HAVE_FUNC_GETHOSTBYADDR_R_5)
he = gethostbyaddr_r(addr_buf, buf_size, proto, h, buffer, size, err);
#elif defined(HAVE_FUNC_GETHOSTBYADDR_R_3)
he = gethostbyaddr_r(addr_buf, buf_size, proto, h, buffer);
*err = h_errno;
*err = gethostbyaddr_r(addr_buf, buf_size, proto, h, &buffer);
he = h;
#elif defined(HAVE_GETHOSTBYADDR)
wxLOCK_GETBY_MUTEX(addr);