aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-08-03 07:57:31 +0000
committerNick Mathewson <nickm@torproject.org>2007-08-03 07:57:31 +0000
commit652d4e024857a8872795fe2d4ce6d7071059728c (patch)
tree52136187f8ce1d36e212b155964b486a5a8809b5 /src/common/compat.c
parent500899cc53b15a043187a55a2caaf0fdf3b84c6a (diff)
downloadtor-652d4e024857a8872795fe2d4ce6d7071059728c.tar
tor-652d4e024857a8872795fe2d4ce6d7071059728c.tar.gz
r13926@Kushana: nickm | 2007-08-03 00:55:23 -0700
Fix compilation with HAVE_GETADDRINFO unset svn:r11042
Diffstat (limited to 'src/common/compat.c')
-rw-r--r--src/common/compat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 710854b1f..0becc00be 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1128,11 +1128,11 @@ tor_addr_lookup(const char *name, uint16_t family, tor_addr_t *addr)
if (ent) {
addr->sa.sin_family = ent->h_addrtype;
if (ent->h_addrtype == AF_INET) {
- memcpy(addr->sa.sin_addr, ent->h_addr, sizeof(struct in_addr));
+ memcpy(&addr->sa.sin_addr, ent->h_addr, sizeof(struct in_addr));
} else if (ent->h_addrtype == AF_INET6) {
- memcpy(addr->sa.sin6_addr, ent->h_addr, sizeof(struct in6_addr));
+ memcpy(&addr->sa6.sin6_addr, ent->h_addr, sizeof(struct in6_addr));
} else {
- tor_assert(0) /* gethostbyname() returned a bizarre addrtype */
+ tor_assert(0); /* gethostbyname() returned a bizarre addrtype */
}
return 0;
}