summaryrefslogtreecommitdiff
path: root/src/common/address.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-06-05 11:06:26 -0400
committerNick Mathewson <nickm@torproject.org>2012-06-05 11:06:26 -0400
commitb482c870ca3d70bc5611b8eb447ebbe3418bf3a9 (patch)
tree653f7663bbe2edd79880a0ddc3579dfb78ae5491 /src/common/address.h
parent2468a1bd2c3a989c4225897e58b5bf09ac08ba61 (diff)
downloadtor-b482c870ca3d70bc5611b8eb447ebbe3418bf3a9.tar.gz
tor-b482c870ca3d70bc5611b8eb447ebbe3418bf3a9.zip
Fix some mingw build warnings
These include: - Having a weird in_addr that can't be initialized with {0} - Needing INVALID_HANDLE_VALUE instead of -1 for file handles. - Having a weird dependent definition for struct stat. - pid is signed, not unsigned.
Diffstat (limited to 'src/common/address.h')
-rw-r--r--src/common/address.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/address.h b/src/common/address.h
index e942949bf2..c6c126862a 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -26,6 +26,8 @@ typedef struct tor_addr_t
{
sa_family_t family;
union {
+ uint32_t dummy_; /* This field is here so we have something to initialize
+ * with a reliable cross-platform type. */
struct in_addr in_addr;
struct in6_addr in6_addr;
} addr;
@@ -38,7 +40,7 @@ typedef struct tor_addr_port_t
uint16_t port;
} tor_addr_port_t;
-#define TOR_ADDR_NULL {AF_UNSPEC, {{0}}};
+#define TOR_ADDR_NULL {AF_UNSPEC, {0}};
static INLINE const struct in6_addr *tor_addr_to_in6(const tor_addr_t *a);
static INLINE uint32_t tor_addr_to_ipv4n(const tor_addr_t *a);