diff options
-rw-r--r-- | src/dillo.cc | 4 | ||||
-rw-r--r-- | src/dns.c | 5 | ||||
-rw-r--r-- | src/dns.h | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/dillo.cc b/src/dillo.cc index 3e663a4d..45a98de6 100644 --- a/src/dillo.cc +++ b/src/dillo.cc @@ -205,8 +205,8 @@ static DilloUrl *makeStartUrl(char *str, bool local) */ int main(int argc, char **argv) { - uint opt_id; - uint options_got = 0; + uint_t opt_id; + uint_t options_got = 0; uint32_t xid = 0; int idx = 1; int xpos = PREFS_GEOMETRY_DEFAULT_XPOS, ypos = PREFS_GEOMETRY_DEFAULT_YPOS, @@ -87,7 +87,6 @@ static GDnsCache *dns_cache; static int dns_cache_size, dns_cache_size_max; static GDnsQueue *dns_queue; static int dns_queue_size, dns_queue_size_max; -static bool_t ipv6_enabled; /* ---------------------------------------------------------------------- @@ -200,16 +199,14 @@ void a_Dns_init(void) #endif } - /* IPv6 test */ - ipv6_enabled = FALSE; #ifdef ENABLE_IPV6 + /* IPv6 test */ { /* If the IPv6 address family is not available there is no point wasting time trying to connect to v6 addresses. */ int fd = socket(AF_INET6, SOCK_STREAM, 0); if (fd >= 0) { close(fd); - ipv6_enabled = TRUE; } } #endif @@ -14,7 +14,11 @@ void a_Dns_init (void); void a_Dns_freeall(void); void a_Dns_resolve(const char *hostname, DnsCallback_t cb_func, void *cb_data); -#define DILLO_ADDR_MAX sizeof(struct in6_addr) +#ifdef ENABLE_IPV6 +# define DILLO_ADDR_MAX sizeof(struct in6_addr) +#else +# define DILLO_ADDR_MAX sizeof(struct in_addr) +#endif typedef struct _DilloHost { |