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 366 forks source link

build error with nginx 1.11.13 #151

Open seaurching opened 7 years ago

seaurching commented 7 years ago

/root/Desktop/nginx/nginx_tcp_proxy_module-master/ngx_tcp_core_module.c:484:9: error: cannot convert to a pointer type if (ngx_memcmp(ls[i].sockaddr + off, u.sockaddr + off, len) != 0) { ^ /root/Desktop/nginx/nginx_tcp_proxy_module-master/ngx_tcp_core_module.c:504:5: error: incompatible type for argument 2 of ‘memcpy’ ngx_memcpy(ls->sockaddr, u.sockaddr, u.socklen); ^ In file included from /usr/include/features.h:375:0, from /usr/include/sys/types.h:25, from src/os/unix/ngx_linux_config.h:18, from src/core/ngx_config.h:26, from /root/Desktop/nginx/nginx_tcp_proxy_module-master/ngx_tcp_core_module.c:2: /usr/include/bits/string3.h:48:1: note: expected ‘const void restrict’ but argument is of type ‘ngx_sockaddr_t’ __NTH (memcpy (void restrict dest, const void *restrict src, ^ make[1]: [objs/addon/nginx_tcp_proxy_module-master/ngx_tcp_core_module.o] Error 1 make[1]: Waiting for unfinished jobs.... make[1]: Leaving directory `/root/Desktop/nginx/nginx-1.11.13'

and with nginx-1.8.1 there has errors: /root/Desktop/nginx/nginx_tcp_proxy_module-master/modules/ngx_tcp_upstream_busyness_module.c:146:53: error: ‘NGX_INVALID_CHECK_INDEX’ undeclared (first use in this function) == (ngx_uint_t) NGX_INVALID_CHECK_INDEX) { ^ /root/Desktop/nginx/nginx_tcp_proxy_module-master/modules/ngx_tcp_upstream_busyness_module.c:209:7: error: ‘ngx_peer_connection_t’ has no member named ‘check_inde’ pc->check_index = peer->check_index; ^ make[1]: *** [objs/addon/modules/ngx_tcp_upstream_busyness_module.o] Error 1 make[1]: Leaving directory `/root/Desktop/nginx/nginx-1.8.1'