apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/network_io/unix sockaddr.c
Date Mon, 24 May 2004 11:27:45 GMT
trawick     2004/05/24 04:27:45

  Modified:    network_io/unix Tag: APR_0_9_BRANCH sockaddr.c
  Log:
  backport this from 1.0-dev:
  
  * 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.
  
  Submitted by: Joe Orton
  Reviewed by:  Jeff Trawick
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.43.2.6  +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.43.2.5
  retrieving revision 1.43.2.6
  diff -u -r1.43.2.5 -r1.43.2.6
  --- sockaddr.c	21 May 2004 22:10:51 -0000	1.43.2.5
  +++ sockaddr.c	24 May 2004 11:27:45 -0000	1.43.2.6
  @@ -609,12 +609,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