Project

General

Profile

lighttpd_fix_compile_error_without_ipv6.patch

Deweloper, 2017-10-26 21:12

View differences:

lighttpd-1.4.47/src/network.c 2017-10-23 23:11:18.397755298 +0200
77 77
    if (addr->plain.sa_family == AF_INET6)
78 78
        buffer_append_string_len(host, CONST_STR_LEN("]"));
79 79
    if (addr->plain.sa_family != AF_UNIX) {
80
#ifdef HAVE_IPV6
80 81
        unsigned short port = (addr->plain.sa_family == AF_INET)
81 82
          ? ntohs(addr->ipv4.sin_port)
82 83
          : ntohs(addr->ipv6.sin6_port);
84
#else
85
        unsigned short port = ntohs(addr->ipv4.sin_port);
86
#endif
83 87
        buffer_append_string_len(host, CONST_STR_LEN(":"));
84 88
        buffer_append_int(host, (int)port);
85 89
    }