Changeset c38b3645e99a34831c2bb2883fc16adaba9b140a

Show
Ignore:
Timestamp:
02/21/11 16:43:19 (7 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1298306599 +0000
git-parent:

[faf3acbe16b2e29ad71bb274f017b81af252e7b7]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1298306599 +0000
Message:

this assignment break strict aliasing rules under gcc, we'll need to use a memcpy instead.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/udns/udns_resolver.c

    r6200bb2 rc38b364  
    530530      if (sns->sa.sa_family == AF_INET) { 
    531531        sin6.sin6_port = sns->sin.sin_port; 
    532         ((struct in_addr*)&sin6.sin6_addr)[3] = sns->sin.sin_addr; 
     532        memcpy(&((struct in_addr*)&sin6.sin6_addr)[3], 
     533               &sns->sin.sin_addr, sizeof(struct in_addr)); 
    533534        sns->sin6 = sin6; 
    534535      }