aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-07-29 02:55:24 +0000
committerNick Mathewson <nickm@torproject.org>2007-07-29 02:55:24 +0000
commit25bd4204d0f0db46fb81a12df475760f3a6fce68 (patch)
tree77b0537f13406ead84c4c8bd72df7838abd24a70 /src
parentd2adb68ed63eebfa8ec3fb58cc28e6428418427f (diff)
downloadtor-25bd4204d0f0db46fb81a12df475760f3a6fce68.tar
tor-25bd4204d0f0db46fb81a12df475760f3a6fce68.tar.gz
r13964@catbus: nickm | 2007-07-28 22:55:10 -0400
Change "IN_ADDR" macro to "IN4_ADDR" in an attempt to fix mingw compilation svn:r10963
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.h4
-rw-r--r--src/common/util.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index 2e97dee22..9b23467e7 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -319,7 +319,7 @@ static INLINE uint32_t IPV4IP(const tor_addr_t *a);
static INLINE uint32_t IPV4IPh(const tor_addr_t *a);
static INLINE uint32_t IPV4MAPh(const tor_addr_t *a);
static INLINE uint16_t IN_FAMILY(const tor_addr_t *a);
-static INLINE const struct in_addr *IN_ADDR(const tor_addr_t *a);
+static INLINE const struct in_addr *IN4_ADDR(const tor_addr_t *a);
static INLINE const struct in6_addr *IN6_ADDR(const tor_addr_t *a);
static INLINE uint16_t IN_PORT(const tor_addr_t *a);
@@ -344,7 +344,7 @@ IN_FAMILY(const tor_addr_t *a)
return a->sa.sin_family;
}
static INLINE const struct in_addr *
-IN_ADDR(const tor_addr_t *a)
+IN4_ADDR(const tor_addr_t *a)
{
return &a->sa.sin_addr;
}
diff --git a/src/common/util.c b/src/common/util.c
index 05e538c46..a2ac9b934 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -2260,7 +2260,7 @@ tor_addr_parse_mask_ports(const char *s, tor_addr_t *addr_out,
#else
if (v_family == AF_INET6 && v4map) {
v_family = AF_INET;
- IN_ADDR(addr_out).s_addr = IN6_ADDR(addr_out).s6_addr32[3];
+ IN4_ADDR(addr_out).s_addr = IN6_ADDR(addr_out).s6_addr32[3];
}
#endif
*/
@@ -2391,7 +2391,7 @@ tor_addr_is_null(const tor_addr_t *addr)
return 1;
return 0;
case AF_INET:
- if (!IN_ADDR(addr)->s_addr)
+ if (!IN4_ADDR(addr)->s_addr)
return 1;
return 0;
default:
@@ -2556,7 +2556,7 @@ tor_addr_to_str(char *dest, const tor_addr_t *addr, int len)
tor_assert(addr && dest);
if (IN_FAMILY(addr) == AF_INET) {
- return tor_inet_ntop(AF_INET, IN_ADDR(addr), dest, len);
+ return tor_inet_ntop(AF_INET, IN4_ADDR(addr), dest, len);
} else if (IN_FAMILY(addr) == AF_INET6) {
return tor_inet_ntop(AF_INET6, IN6_ADDR(addr), dest, len);
} else {