yaoweibin / nginx_tcp_proxy_module

add the feature of tcp proxy with nginx, with health check and status monitor
http://yaoweibin.github.com/nginx_tcp_proxy_module
1.64k stars 365 forks source link

fix build error with nginx 1.14.2 #169

Closed dsugisawa-mixi closed 5 years ago

dsugisawa-mixi commented 5 years ago

fix issue #167 works with nginx 1.14.2

lev-gc commented 5 years ago

emm... yes the error when execute make has been fixed, but it seems not working actually. image

dsugisawa-mixi commented 5 years ago

Thanks for your help, fixed bug related to pointer offset.

    u_char                  sockaddr[NGX_SOCKADDRLEN];

and

typedef union {
    struct sockaddr           sockaddr;
    struct sockaddr_in        sockaddr_in;
#if (NGX_HAVE_INET6)
    struct sockaddr_in6       sockaddr_in6;
#endif
#if (NGX_HAVE_UNIX_DOMAIN)
    struct sockaddr_un        sockaddr_un;
#endif
} ngx_sockaddr_t;
yaoweibin commented 5 years ago

LGTM