2007-11-08 04:56:58 +01:00
|
|
|
$NetBSD: patch-ac,v 1.5 2007/11/08 03:56:58 obache Exp $
|
2007-08-19 03:36:22 +02:00
|
|
|
|
2007-11-08 04:56:58 +01:00
|
|
|
--- upnp/src/genlib/net/uri/uri.c.orig 2007-08-06 01:21:23.000000000 +0000
|
2007-08-19 03:36:22 +02:00
|
|
|
+++ upnp/src/genlib/net/uri/uri.c
|
|
|
|
@@ -625,9 +625,9 @@ parse_hostport( const char *in,
|
|
|
|
//call gethostbyname_r (reentrant form of gethostbyname)
|
|
|
|
// TODO: Use autoconf to discover this rather than the
|
|
|
|
// platform-specific stuff below
|
|
|
|
-#if defined(WIN32) || defined(__CYGWIN__)
|
|
|
|
+#if defined(WIN32) || defined(__CYGWIN__) || defined(_AIX50) || defined(__upux11)
|
2007-11-08 04:56:58 +01:00
|
|
|
h = gethostbyname(temp_host_name);
|
2007-08-19 03:36:22 +02:00
|
|
|
-#elif defined(SPARC_SOLARIS)
|
|
|
|
+#elif defined(sun) || defined(__sun) || defined(sgi) || defined(__sgi)
|
2007-11-08 04:56:58 +01:00
|
|
|
errCode = gethostbyname_r(
|
|
|
|
temp_host_name,
|
|
|
|
&h,
|
|
|
|
@@ -647,12 +647,17 @@ parse_hostport( const char *in,
|
2007-08-19 03:36:22 +02:00
|
|
|
if ( h == NULL ) {
|
2007-11-08 04:56:58 +01:00
|
|
|
errCode = 1;
|
2007-08-19 03:36:22 +02:00
|
|
|
}
|
|
|
|
-#elif defined(__linux__)
|
|
|
|
+#elif defined(__GLIBC__)
|
2007-11-08 04:56:58 +01:00
|
|
|
errCode = gethostbyname_r(
|
|
|
|
temp_host_name,
|
|
|
|
&h_buf,
|
|
|
|
temp_hostbyname_buff,
|
|
|
|
BUFFER_SIZE, &h, &errcode );
|
2007-08-19 03:36:22 +02:00
|
|
|
+#elif defined(__osf1__) || defined(__hpux) || defined(_AIX)
|
|
|
|
+ errCode = gethostbyname_r( temp_host_name,
|
|
|
|
+ &h_buf,
|
|
|
|
+ (struct hostent_data*)temp_hostbyname_buff);
|
|
|
|
+ h = &h_buf;
|
|
|
|
#else
|
2007-11-08 04:56:58 +01:00
|
|
|
{
|
|
|
|
struct addrinfo hints, *res, *res0;
|