Skip to content

Commit 812e2fd

Browse files
committed
fixed compilation with old nginx
1 parent 8c2229c commit 812e2fd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ngx_rtmp_proxy_protocol.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <ngx_config.h>
88
#include <ngx_core.h>
9+
#include <nginx.h>
910
#include "ngx_rtmp_proxy_protocol.h"
1011

1112

@@ -164,8 +165,11 @@ ngx_rtmp_proxy_protocol_recv(ngx_event_t *rev)
164165
goto failed;
165166
}
166167

167-
len = ngx_sock_ntop(addr.sockaddr, addr.socklen, text,
168-
NGX_SOCKADDR_STRLEN, 0);
168+
len = ngx_sock_ntop(addr.sockaddr,
169+
#if (nginx_version >= 1005003)
170+
addr.socklen,
171+
#endif
172+
text, NGX_SOCKADDR_STRLEN, 0);
169173
if (len == 0) {
170174
goto failed;
171175
}

0 commit comments

Comments
 (0)