Skip to content

Commit

Permalink
fixed compilation with old nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
arut committed Apr 3, 2014
1 parent 8c2229c commit 812e2fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ngx_rtmp_proxy_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <ngx_config.h>
#include <ngx_core.h>
#include <nginx.h>
#include "ngx_rtmp_proxy_protocol.h"


Expand Down Expand Up @@ -164,8 +165,11 @@ ngx_rtmp_proxy_protocol_recv(ngx_event_t *rev)
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;
}
Expand Down

0 comments on commit 812e2fd

Please sign in to comment.