apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/network_io/unix sockaddr.c
Date Sun, 23 May 2004 17:26:39 GMT
jorton      2004/05/23 10:26:38

  Modified:    network_io/unix sockaddr.c
  Log:
  * network_io/unix/sockaddr.c (apr_getnameinfo): Use apr_uint32_t to
  fix build on platforms without uint32_t; use struct sockaddr_in rather
  than struct apr_sockaddr_t.
  
  Revision  Changes    Path
  1.51      +4 -5      apr/network_io/unix/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockaddr.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -d -u -r1.50 -r1.51
  --- sockaddr.c	20 May 2004 14:53:21 -0000	1.50
  +++ sockaddr.c	23 May 2004 17:26:38 -0000	1.51
  @@ -581,12 +581,11 @@
   #if APR_HAVE_IPV6
       if (sockaddr->family == AF_INET6 &&
           IN6_IS_ADDR_V4MAPPED(&sockaddr->sa.sin6.sin6_addr)) {
  -        struct apr_sockaddr_t tmpsa;
  -        tmpsa.sa.sin.sin_family = AF_INET;
  -        tmpsa.sa.sin.sin_addr.s_addr = ((uint32_t *)sockaddr->ipaddr_ptr)[3];
  +        struct sockaddr_in tmpsa;
  +        tmpsa.sin_family = AF_INET;
  +        tmpsa.sin_addr.s_addr = ((apr_uint32_t *)sockaddr->ipaddr_ptr)[3];
   
  -        rc = getnameinfo((const struct sockaddr *)&tmpsa.sa,
  -                         sizeof(struct sockaddr_in),
  +        rc = getnameinfo((const struct sockaddr *)&tmpsa, sizeof(tmpsa),
                            tmphostname, sizeof(tmphostname), NULL, 0,
                            flags != 0 ? flags : NI_NAMEREQD);
       }
  
  
  

Mime
View raw message