]> granicus.if.org Git - libevent/commitdiff
Add compile-time check for AF_UNSPEC==PF_UNSPEC
authorNick Mathewson <nickm@torproject.org>
Mon, 31 Jan 2011 21:44:06 +0000 (16:44 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 31 Jan 2011 21:44:06 +0000 (16:44 -0500)
evutil.c

index 8bab27bd50b86268d55d0bd4c89933fd3fd3af14..926ebc4709177f617fbe7ab5d049d543af15e6cd 100644 (file)
--- a/evutil.c
+++ b/evutil.c
@@ -753,6 +753,10 @@ evutil_getaddrinfo_infer_protocols(struct evutil_addrinfo *hints)
        }
 }
 
+#if AF_UNSPEC != PF_UNSPEC
+#error "I cannot build on a system where AF_UNSPEC != PF_UNSPEC"
+#endif
+
 /** Implements the part of looking up hosts by name that's common to both
  * the blocking and nonblocking resolver:
  *   - Adjust 'hints' to have a reasonable socktype and protocol.