ossp-pkg/l2/l2_ch_socket.c 1.12 -> 1.13
--- l2_ch_socket.c 2001/09/05 07:47:12 1.12
+++ l2_ch_socket.c 2001/09/05 16:15:38 1.13
@@ -39,7 +39,11 @@
#define HAVE_INET_ATON
#ifndef HAVE_INET_PTON
-#ifdef HAVE_INET_ATON
+#ifdef HAVE_INET_ATON
+
+/******************************************************************
+IPv4 source used from Unix Network Programming by Richard STEVENS
+ ******************************************************************/
static int inet_pton(int iFamily, const char *pszAddress, void *pvMemref)
{
int i = 0;
@@ -205,7 +209,7 @@
}
/* resolve host nominally */
- else if ((pHostentry = gethostbyname2(cfg->pszHost, AF_INET6)) != NULL)
+ else if (pHostentry = gethostbyname(cfg->pszHost) != NULL)
{
if (pHostentry->h_addrtype == AF_INET6)
{
|
|