8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 02:03:03 +01:00

inet_aton() does not exist in Windows.

This commit is contained in:
robocop 2008-09-24 09:27:11 +00:00
parent 03751d32da
commit e1487d3684

View File

@ -1884,14 +1884,21 @@ static int get_host_address(const char* name,
*
* Functional description
* Fills array with addresses up to arr_size (must be at least 1).
* Returns require number of elements in array to be able to store
* Returns required number of elements in array to be able to store
* all host addresses (may be less, equal or greater than arr_size).
*
**************************************/
#if defined(WIN_NT)
// IP v4 only.
host_addr_arr[0].s_addr = inet_addr(name);
if (host_addr_arr[0].s_addr != INADDR_NONE)
return 1;
#else
if (inet_aton(name, &host_addr_arr[0]))
{
return 1;
}
#endif
const hostent* host = gethostbyname(name);