diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-11-16 16:39:04 +0100 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-11-16 16:39:04 +0100 |
commit | 9fc7725aba8c623e2b35c4ceaee792d5f354912f (patch) | |
tree | 005891c55ef52e453e555e44482ab9e7a2f641c6 /src/common/address.c | |
parent | 688b53059e56ddbc287de688258ebdd51b94e001 (diff) | |
download | tor-9fc7725aba8c623e2b35c4ceaee792d5f354912f.tar.gz tor-9fc7725aba8c623e2b35c4ceaee792d5f354912f.zip |
Don't allow building on platforms where AF_UNSPEC != 0
Diffstat (limited to 'src/common/address.c')
-rw-r--r-- | src/common/address.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/address.c b/src/common/address.c index 00d2d100b8..f40e428cce 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -52,6 +52,13 @@ #include <string.h> #include <assert.h> +/* tor_addr_is_null() and maybe other functions rely on AF_UNSPEC being 0 to + * work correctly. Bail out here if we've found a platform where AF_UNSPEC + * isn't 0. */ +#if AF_UNSPEC != 0 +#error We rely on AF_UNSPEC being 0. Let us know about your platform, please! +#endif + /** Convert the tor_addr_t in <b>a</b>, with port in <b>port</b>, into a * sockaddr object in *<b>sa_out</b> of object size <b>len</b>. If not enough * room is available in sa_out, or on error, return 0. On success, return |