Blob Blame History Raw
--- gsoap-2.7/gsoap/stdsoap2.c	2007-08-21 21:24:33.000000000 -0500
+++ gsoap-2.7mf/gsoap/stdsoap2.c	2007-09-13 12:13:56.000000000 -0500
@@ -3405,7 +3405,7 @@ tcp_gethost(struct soap *soap, const cha
   /* inet_addr(), and hostGetByName() expect "char *"; addr is a "const char *". */
   iadd = inet_addr((char*)addr);
 #else
-#if defined(_AIX43) || defined(TRU64)
+#if defined(_AIX43) || ((defined(TRU64) || defined(HP_UX)) && defined(HAVE_GETHOSTBYNAME_R))
   struct hostent_data ht_data;
 #endif
 #ifdef AS400
@@ -3421,7 +3421,7 @@ tcp_gethost(struct soap *soap, const cha
 #if defined(__GLIBC__) || (defined(HAVE_GETHOSTBYNAME_R) && (defined(FREEBSD) || defined(__FreeBSD__)))
   if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
     host = NULL;
-#elif defined(_AIX43) || defined(TRU64)
+#elif defined(_AIX43) || ((defined(TRU64) || defined(HP_UX)) && defined(HAVE_GETHOSTBYNAME_R))
   memset((void*)&ht_data, 0, sizeof(ht_data));
   if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
   { host = NULL;
@@ -3463,6 +3463,10 @@ tcp_gethost(struct soap *soap, const cha
 #endif
 
 /******************************************************************************/
+#if defined(HP_UX) && defined(HAVE_GETHOSTBYNAME_R)
+extern int h_errno;
+#endif
+
 #ifndef WITH_NOIO
 #ifndef PALM_1
 static SOAP_SOCKET