From eb692be9c8ea2d52e28a0b7b8258bd76483c3f3c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 13 Feb 2011 01:27:06 -0500 Subject: [PATCH] NM: Fix sample/http-server ipv6 fixes Fix 1: Use #include "../xyz" rather than #include <../xyz> Fix 2: util-internal.h includes ipv6-internal.h, which in turn defines a replacement AF_INET6 on platforms that don't have it. As such, the AF_INET6 checks shouldn't be needed. (right?) --- sample/http-server.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sample/http-server.c b/sample/http-server.c index 0739b21d..76026a51 100644 --- a/sample/http-server.c +++ b/sample/http-server.c @@ -41,7 +41,7 @@ # endif #endif -#include <../util-internal.h> +#include "../util-internal.h" #ifdef WIN32 #define stat _stat @@ -371,11 +371,9 @@ main(int argc, char **argv) if (ss.ss_family == AF_INET) { got_port = ntohs(((struct sockaddr_in*)&ss)->sin_port); inaddr = &((struct sockaddr_in*)&ss)->sin_addr; -#ifdef AF_INET6 } else if (ss.ss_family == AF_INET6) { got_port = ntohs(((struct sockaddr_in6*)&ss)->sin6_port); inaddr = &((struct sockaddr_in6*)&ss)->sin6_addr; -#endif } else { fprintf(stderr, "Weird address family %d\n", ss.ss_family);