fixed compilation with old nginx

This commit is contained in:
Roman Arutyunyan 2014-04-03 19:13:26 +04:00
parent 8c2229cce5
commit 812e2fd7b1
1 changed files with 6 additions and 2 deletions

View File

@ -6,6 +6,7 @@
#include <ngx_config.h>
#include <ngx_core.h>
#include <nginx.h>
#include "ngx_rtmp_proxy_protocol.h"
@ -164,8 +165,11 @@ skip:
goto failed;
}
len = ngx_sock_ntop(addr.sockaddr, addr.socklen, text,
NGX_SOCKADDR_STRLEN, 0);
len = ngx_sock_ntop(addr.sockaddr,
#if (nginx_version >= 1005003)
addr.socklen,
#endif
text, NGX_SOCKADDR_STRLEN, 0);
if (len == 0) {
goto failed;
}