2499. [port] solaris: lib/lwres/getaddrinfo.c namespace clash.

[RT #18837]
This commit is contained in:
Mark Andrews
2009-03-31 21:32:25 +00:00
parent 83a781a5cb
commit cd456aadac
2 changed files with 9 additions and 6 deletions
+3
View File
@@ -7,6 +7,9 @@
2578. [bug] Changed default sig-signing-type to 65534, because
65535 turns out to be reserved. [RT #19477]
2499. [port] solaris: lib/lwres/getaddrinfo.c namespace clash.
[RT #18837]
--- 9.6.1b1 released ---
2577. [doc] Clarified some statistics counters. [RT #19454]
+6 -6
View File
@@ -18,7 +18,7 @@
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: getaddrinfo.c,v 1.52 2007/09/13 04:45:18 each Exp $ */
/* $Id: getaddrinfo.c,v 1.52.254.1 2009/03/31 21:32:25 marka Exp $ */
/*! \file */
@@ -145,7 +145,7 @@
#define SA(addr) ((struct sockaddr *)(addr))
#define SIN(addr) ((struct sockaddr_in *)(addr))
#define SIN6(addr) ((struct sockaddr_in6 *)(addr))
#define SUN(addr) ((struct sockaddr_un *)(addr))
#define SLOCAL(addr) ((struct sockaddr_un *)(addr))
/*! \struct addrinfo
*/
@@ -709,17 +709,17 @@ lwres_freeaddrinfo(struct addrinfo *ai) {
static int
get_local(const char *name, int socktype, struct addrinfo **res) {
struct addrinfo *ai;
struct sockaddr_un *sun;
struct sockaddr_un *slocal;
if (socktype == 0)
return (EAI_SOCKTYPE);
ai = ai_alloc(AF_LOCAL, sizeof(*sun));
ai = ai_alloc(AF_LOCAL, sizeof(*slocal));
if (ai == NULL)
return (EAI_MEMORY);
sun = SUN(ai->ai_addr);
strncpy(sun->sun_path, name, sizeof(sun->sun_path));
slocal = SLOCAL(ai->ai_addr);
strncpy(slocal->sun_path, name, sizeof(slocal->sun_path));
ai->ai_socktype = socktype;
/*