summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@whissi.de>2016-06-13 20:30:54 +0200
committerKristian Fiskerstrand <k_f@gentoo.org>2016-06-13 20:36:32 +0200
commitfa58d5378eee1fc28ceff889a80e26beffa23d38 (patch)
treeb263b5ce82a7e454acf3602b4bbf83152d819cf2 /www-servers/nginx/files
parentsys-libs/libunwind: clean up debug configure bug (diff)
downloadgentoo-fa58d5378eee1fc28ceff889a80e26beffa23d38.tar.gz
gentoo-fa58d5378eee1fc28ceff889a80e26beffa23d38.tar.bz2
gentoo-fa58d5378eee1fc28ceff889a80e26beffa23d38.zip
www-servers/nginx: Security cleanup
Dropping nginx-1.8.1 which is vulnerable to CVE-2016-4450 and was replaced by nginx-1.10.1 via commit 9d8b4adb72f5912b8c121bdda6ffee72e08926d7. Gentoo-Bug: 584744 Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'www-servers/nginx/files')
-rw-r--r--www-servers/nginx/files/AJP-nginx-1.7.9+.patch184
-rw-r--r--www-servers/nginx/files/check-1.9.2.patch242
-rw-r--r--www-servers/nginx/files/lua-nginx-1.7.6.patch39
-rw-r--r--www-servers/nginx/files/rtmp-nginx-1.7.6.patch89
4 files changed, 0 insertions, 554 deletions
diff --git a/www-servers/nginx/files/AJP-nginx-1.7.9+.patch b/www-servers/nginx/files/AJP-nginx-1.7.9+.patch
deleted file mode 100644
index 35460fc5ad80..000000000000
--- a/www-servers/nginx/files/AJP-nginx-1.7.9+.patch
+++ /dev/null
@@ -1,184 +0,0 @@
-From bf6cd93f2098b59260de8d494f0f4b1f11a84627 Mon Sep 17 00:00:00 2001
-From: Weibin Yao <yaoweibin@gmail.com>
-Date: Fri, 27 Feb 2015 23:13:30 +0800
-Subject: [PATCH] fixed the compatible problem with nginx-1.7.9+
-
----
- ngx_http_ajp.h | 1 +
- ngx_http_ajp_module.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 86 insertions(+)
-
-diff --git a/ngx_http_ajp.h b/ngx_http_ajp.h
-index 72502ad..b3c7051 100644
---- a/ngx_http_ajp.h
-+++ b/ngx_http_ajp.h
-@@ -5,6 +5,7 @@
- #include <ngx_config.h>
- #include <ngx_core.h>
- #include <ngx_http.h>
-+#include <nginx.h>
- #include "ngx_http_ajp_module.h"
-
- #define AJP13_DEF_HOST "127.0.0.1"
-diff --git a/ngx_http_ajp_module.c b/ngx_http_ajp_module.c
-index e4d5b00..be32459 100644
---- a/ngx_http_ajp_module.c
-+++ b/ngx_http_ajp_module.c
-@@ -464,8 +464,12 @@ ngx_http_ajp_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
-
- #if (NGX_HTTP_CACHE)
-
-+#if (nginx_version >= 1007009)
-+ if (alcf->upstream.cache > 0)
-+#else
- if (alcf->upstream.cache != NGX_CONF_UNSET_PTR
- && alcf->upstream.cache != NULL)
-+#endif
- {
- return "is incompatible with \"ajp_cache\"";
- }
-@@ -534,15 +538,27 @@ ngx_http_ajp_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
- ngx_http_ajp_loc_conf_t *alcf = conf;
-
- ngx_str_t *value;
-+#if (nginx_version >= 1007009)
-+ ngx_http_complex_value_t cv;
-+ ngx_http_compile_complex_value_t ccv;
-+#endif
-
- value = cf->args->elts;
-
-+#if (nginx_version >= 1007009)
-+ if (alcf->upstream.cache != NGX_CONF_UNSET) {
-+#else
- if (alcf->upstream.cache != NGX_CONF_UNSET_PTR) {
-+#endif
- return "is duplicate";
- }
-
- if (ngx_strcmp(value[1].data, "off") == 0) {
-+#if (nginx_version >= 1007009)
-+ alcf->upstream.cache = 0;
-+#else
- alcf->upstream.cache = NULL;
-+#endif
- return NGX_CONF_OK;
- }
-
-@@ -550,11 +566,44 @@ ngx_http_ajp_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
- return "is incompatible with \"ajp_store\"";
- }
-
-+#if (nginx_version >= 1007009)
-+ alcf->upstream.cache = 1;
-+
-+ ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
-+
-+ ccv.cf = cf;
-+ ccv.value = &value[1];
-+ ccv.complex_value = &cv;
-+
-+ if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
-+ return NGX_CONF_ERROR;
-+ }
-+
-+ if (cv.lengths != NULL) {
-+
-+ alcf->upstream.cache_value = ngx_palloc(cf->pool,
-+ sizeof(ngx_http_complex_value_t));
-+ if (alcf->upstream.cache_value == NULL) {
-+ return NGX_CONF_ERROR;
-+ }
-+
-+ *alcf->upstream.cache_value = cv;
-+
-+ return NGX_CONF_OK;
-+ }
-+
-+ alcf->upstream.cache_zone = ngx_shared_memory_add(cf, &value[1], 0,
-+ &ngx_http_ajp_module);
-+ if (alcf->upstream.cache_zone == NULL) {
-+ return NGX_CONF_ERROR;
-+ }
-+#else
- alcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0,
- &ngx_http_ajp_module);
- if (alcf->upstream.cache == NULL) {
- return NGX_CONF_ERROR;
- }
-+#endif
-
- return NGX_CONF_OK;
- }
-@@ -666,7 +715,11 @@ ngx_http_ajp_create_loc_conf(ngx_conf_t *cf)
- conf->upstream.pass_request_body = NGX_CONF_UNSET;
-
- #if (NGX_HTTP_CACHE)
-+#if (nginx_version >= 1007009)
-+ conf->upstream.cache = NGX_CONF_UNSET;
-+#else
- conf->upstream.cache = NGX_CONF_UNSET_PTR;
-+#endif
- conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT;
- conf->upstream.cache_valid = NGX_CONF_UNSET_PTR;
- conf->upstream.cache_lock = NGX_CONF_UNSET;
-@@ -699,6 +752,18 @@ ngx_http_ajp_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
- ngx_str_t *h;
- ngx_hash_init_t hash;
-
-+#if (NGX_HTTP_CACHE) && (nginx_version >= 1007009)
-+
-+ if (conf->upstream.store > 0) {
-+ conf->upstream.cache = 0;
-+ }
-+
-+ if (conf->upstream.cache > 0) {
-+ conf->upstream.store = 0;
-+ }
-+
-+#endif
-+
- if (conf->upstream.store != 0) {
- ngx_conf_merge_value(conf->upstream.store,
- prev->upstream.store, 0);
-@@ -864,6 +929,20 @@ ngx_http_ajp_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
-
- #if (NGX_HTTP_CACHE)
-
-+#if (nginx_version >= 1007009)
-+ if (conf->upstream.cache == NGX_CONF_UNSET) {
-+ ngx_conf_merge_value(conf->upstream.cache,
-+ prev->upstream.cache, 0);
-+
-+ conf->upstream.cache_zone = prev->upstream.cache_zone;
-+ conf->upstream.cache_value = prev->upstream.cache_value;
-+ }
-+
-+ if (conf->upstream.cache_zone && conf->upstream.cache_zone->data == NULL) {
-+ ngx_shm_zone_t *shm_zone;
-+
-+ shm_zone = conf->upstream.cache_zone;
-+#else
- ngx_conf_merge_ptr_value(conf->upstream.cache,
- prev->upstream.cache, NULL);
-
-@@ -871,6 +950,7 @@ ngx_http_ajp_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
- ngx_shm_zone_t *shm_zone;
-
- shm_zone = conf->upstream.cache;
-+#endif
-
- ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "\"ajp_cache\" zone \"%V\" is unknown, "
-@@ -910,6 +990,11 @@ ngx_http_ajp_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
- conf->cache_key = prev->cache_key;
- }
-
-+ if (conf->upstream.cache && conf->cache_key.value.data == NULL) {
-+ ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
-+ "no \"fastcgi_cache_key\" for \"fastcgi_cache\"");
-+ }
-+
- ngx_conf_merge_value(conf->upstream.cache_lock,
- prev->upstream.cache_lock, 0);
-
diff --git a/www-servers/nginx/files/check-1.9.2.patch b/www-servers/nginx/files/check-1.9.2.patch
deleted file mode 100644
index 35cb8a753af4..000000000000
--- a/www-servers/nginx/files/check-1.9.2.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-diff --git src/http/modules/ngx_http_upstream_hash_module.c src/http/modules/ngx_http_upstream_hash_module.c
-index 1e2e05c..44a72e2 100644
---- src/http/modules/ngx_http_upstream_hash_module.c
-+++ src/http/modules/ngx_http_upstream_hash_module.c
-@@ -9,6 +9,9 @@
- #include <ngx_core.h>
- #include <ngx_http.h>
-
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+#include "ngx_http_upstream_check_module.h"
-+#endif
-
- typedef struct {
- uint32_t hash;
-@@ -235,6 +238,15 @@ ngx_http_upstream_get_hash_peer(ngx_peer_connection_t *pc, void *data)
- goto next;
- }
-
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
-+ "get hash peer, check_index: %ui",
-+ peer->check_index);
-+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
-+ goto next;
-+ }
-+#endif
-+
- if (peer->max_fails
- && peer->fails >= peer->max_fails
- && now - peer->checked <= peer->fail_timeout)
-@@ -535,6 +547,15 @@ ngx_http_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data)
- continue;
- }
-
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
-+ "get consistent_hash peer, check_index: %ui",
-+ peer->check_index);
-+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
-+ continue;
-+ }
-+#endif
-+
- if (peer->server.len != server->len
- || ngx_strncmp(peer->server.data, server->data, server->len)
- != 0)
-diff --git src/http/modules/ngx_http_upstream_ip_hash_module.c src/http/modules/ngx_http_upstream_ip_hash_module.c
-index 401b58e..ba656bd 100644
---- src/http/modules/ngx_http_upstream_ip_hash_module.c
-+++ src/http/modules/ngx_http_upstream_ip_hash_module.c
-@@ -9,6 +9,9 @@
- #include <ngx_core.h>
- #include <ngx_http.h>
-
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+#include "ngx_http_upstream_check_module.h"
-+#endif
-
- typedef struct {
- /* the round robin data must be first */
-@@ -205,6 +208,15 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data)
- goto next;
- }
-
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
-+ "get ip_hash peer, check_index: %ui",
-+ peer->check_index);
-+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
-+ goto next;
-+ }
-+#endif
-+
- if (peer->max_fails
- && peer->fails >= peer->max_fails
- && now - peer->checked <= peer->fail_timeout)
-diff --git src/http/modules/ngx_http_upstream_least_conn_module.c src/http/modules/ngx_http_upstream_least_conn_module.c
-index 92951bd..48aca2c 100644
---- src/http/modules/ngx_http_upstream_least_conn_module.c
-+++ src/http/modules/ngx_http_upstream_least_conn_module.c
-@@ -9,6 +9,9 @@
- #include <ngx_core.h>
- #include <ngx_http.h>
-
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+#include "ngx_http_upstream_check_module.h"
-+#endif
-
- static ngx_int_t ngx_http_upstream_init_least_conn_peer(ngx_http_request_t *r,
- ngx_http_upstream_srv_conf_t *us);
-@@ -148,6 +151,16 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
- continue;
- }
-
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
-+ "get least_conn peer, check_index: %ui",
-+ peer->check_index);
-+
-+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
-+ continue;
-+ }
-+#endif
-+
- if (peer->max_fails
- && peer->fails >= peer->max_fails
- && now - peer->checked <= peer->fail_timeout)
-@@ -199,6 +212,16 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
- continue;
- }
-
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
-+ "get least_conn peer, check_index: %ui",
-+ peer->check_index);
-+
-+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
-+ continue;
-+ }
-+#endif
-+
- if (peer->conns * best->weight != best->conns * peer->weight) {
- continue;
- }
-diff --git src/http/ngx_http_upstream_round_robin.c src/http/ngx_http_upstream_round_robin.c
-index d6ae33b..416572a 100644
---- src/http/ngx_http_upstream_round_robin.c
-+++ src/http/ngx_http_upstream_round_robin.c
-@@ -9,6 +9,9 @@
- #include <ngx_core.h>
- #include <ngx_http.h>
-
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+#include "ngx_http_upstream_check_module.h"
-+#endif
-
- #define ngx_http_upstream_tries(p) ((p)->number \
- + ((p)->next ? (p)->next->number : 0))
-@@ -96,7 +99,14 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
- peer[n].fail_timeout = server[i].fail_timeout;
- peer[n].down = server[i].down;
- peer[n].server = server[i].name;
--
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ if (!server[i].down) {
-+ peer[n].check_index =
-+ ngx_http_upstream_check_add_peer(cf, us, &server[i].addrs[j]);
-+ } else {
-+ peer[n].check_index = (ngx_uint_t) NGX_ERROR;
-+ }
-+#endif
- *peerp = &peer[n];
- peerp = &peer[n].next;
- n++;
-@@ -159,7 +169,15 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
- peer[n].fail_timeout = server[i].fail_timeout;
- peer[n].down = server[i].down;
- peer[n].server = server[i].name;
--
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ if (!server[i].down) {
-+ peer[n].check_index =
-+ ngx_http_upstream_check_add_peer(cf, us, &server[i].addrs[j]);
-+ }
-+ else {
-+ peer[n].check_index = (ngx_uint_t) NGX_ERROR;
-+ }
-+#endif
- *peerp = &peer[n];
- peerp = &peer[n].next;
- n++;
-@@ -225,6 +243,9 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
- peer[i].current_weight = 0;
- peer[i].max_fails = 1;
- peer[i].fail_timeout = 10;
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ peer[i].check_index = (ngx_uint_t) NGX_ERROR;
-+#endif
- *peerp = &peer[i];
- peerp = &peer[i].next;
- }
-@@ -339,6 +360,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
- peer[0].current_weight = 0;
- peer[0].max_fails = 1;
- peer[0].fail_timeout = 10;
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ peer[0].check_index = (ngx_uint_t) NGX_ERROR;
-+#endif
- peers->peer = peer;
-
- } else {
-@@ -381,6 +405,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
- peer[i].current_weight = 0;
- peer[i].max_fails = 1;
- peer[i].fail_timeout = 10;
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ peer[i].check_index = (ngx_uint_t) NGX_ERROR;
-+#endif
- *peerp = &peer[i];
- peerp = &peer[i].next;
- }
-@@ -441,6 +468,12 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
- goto failed;
- }
-
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
-+ goto failed;
-+ }
-+#endif
-+
- rrp->current = peer;
-
- } else {
-@@ -542,6 +575,12 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peer_data_t *rrp)
- continue;
- }
-
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
-+ continue;
-+ }
-+#endif
-+
- if (peer->max_fails
- && peer->fails >= peer->max_fails
- && now - peer->checked <= peer->fail_timeout)
-diff --git src/http/ngx_http_upstream_round_robin.h src/http/ngx_http_upstream_round_robin.h
-index f2c573f..75e0ed6 100644
---- src/http/ngx_http_upstream_round_robin.h
-+++ src/http/ngx_http_upstream_round_robin.h
-@@ -35,6 +35,10 @@ struct ngx_http_upstream_rr_peer_s {
- ngx_uint_t max_fails;
- time_t fail_timeout;
-
-+#if (NGX_HTTP_UPSTREAM_CHECK)
-+ ngx_uint_t check_index;
-+#endif
-+
- ngx_uint_t down; /* unsigned down:1; */
-
- #if (NGX_HTTP_SSL)
diff --git a/www-servers/nginx/files/lua-nginx-1.7.6.patch b/www-servers/nginx/files/lua-nginx-1.7.6.patch
deleted file mode 100644
index 3cce343186f3..000000000000
--- a/www-servers/nginx/files/lua-nginx-1.7.6.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 0c4528e50dc45de322a6ae86b1fff544d777e722 Mon Sep 17 00:00:00 2001
-From: "Yichun Zhang (agentzh)" <agentzh@gmail.com>
-Date: Wed, 17 Sep 2014 13:18:42 -0700
-Subject: [PATCH] bugfix: fixed compilation error with nginx 1.7.5+ because
- nginx 1.7.5+ changes the API in the events subsystem. thanks Charles R.
- Portwood II and Mathieu Le Marec for the report in #422.
-
----
- src/ngx_http_lua_socket_tcp.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/ngx_http_lua_socket_tcp.c b/src/ngx_http_lua_socket_tcp.c
-index 52cc89d..3743548 100644
---- a/src/ngx_http_lua_socket_tcp.c
-+++ b/src/ngx_http_lua_socket_tcp.c
-@@ -3212,7 +3212,11 @@ ngx_http_lua_socket_tcp_finalize_read_part(ngx_http_request_t *r,
- ngx_del_event(c->read, NGX_READ_EVENT, NGX_CLOSE_EVENT);
- }
-
-+#if defined(nginx_version) && nginx_version >= 1007005
-+ if (c->read->posted) {
-+#else
- if (c->read->prev) {
-+#endif
- ngx_delete_posted_event(c->read);
- }
-
-@@ -3261,7 +3265,11 @@ ngx_http_lua_socket_tcp_finalize_write_part(ngx_http_request_t *r,
- ngx_del_event(c->write, NGX_WRITE_EVENT, NGX_CLOSE_EVENT);
- }
-
-+#if defined(nginx_version) && nginx_version >= 1007005
-+ if (c->write->posted) {
-+#else
- if (c->write->prev) {
-+#endif
- ngx_delete_posted_event(c->write);
- }
-
diff --git a/www-servers/nginx/files/rtmp-nginx-1.7.6.patch b/www-servers/nginx/files/rtmp-nginx-1.7.6.patch
deleted file mode 100644
index ae8ccce8cb39..000000000000
--- a/www-servers/nginx/files/rtmp-nginx-1.7.6.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From dd5f2aa117c617e1f0fde26f8fd58903be2d85e8 Mon Sep 17 00:00:00 2001
-From: Roman Arutyunyan <arut@qip.ru>
-Date: Wed, 17 Sep 2014 07:10:38 +0400
-Subject: [PATCH] fixed compilation
-
----
- ngx_rtmp.c | 4 ++++
- ngx_rtmp.h | 9 +++++++++
- ngx_rtmp_play_module.c | 8 +++++++-
- 3 files changed, 20 insertions(+), 1 deletion(-)
-
-diff --git a/ngx_rtmp.c b/ngx_rtmp.c
-index c079c90..e525a93 100644
---- a/ngx_rtmp.c
-+++ b/ngx_rtmp.c
-@@ -31,7 +31,11 @@ static char * ngx_rtmp_merge_applications(ngx_conf_t *cf,
- ngx_uint_t ctx_index);
-
-
-+#if (nginx_version >= 1007005)
-+ngx_thread_volatile ngx_queue_t ngx_rtmp_init_queue;
-+#else
- ngx_thread_volatile ngx_event_t *ngx_rtmp_init_queue;
-+#endif
-
-
- ngx_uint_t ngx_rtmp_max_module;
-diff --git a/ngx_rtmp.h b/ngx_rtmp.h
-index d3648f7..b87e99e 100644
---- a/ngx_rtmp.h
-+++ b/ngx_rtmp.h
-@@ -12,6 +12,7 @@
- #include <ngx_core.h>
- #include <ngx_event.h>
- #include <ngx_event_connect.h>
-+#include <nginx.h>
-
- #include "ngx_rtmp_amf.h"
- #include "ngx_rtmp_bandwidth.h"
-@@ -198,7 +199,11 @@ typedef struct {
- ngx_str_t *addr_text;
- int connected;
-
-+#if (nginx_version >= 1007005)
-+ ngx_queue_t posted_dry_events;
-+#else
- ngx_event_t *posted_dry_events;
-+#endif
-
- /* client buffer time in msec */
- uint32_t buflen;
-@@ -602,7 +607,11 @@ extern ngx_rtmp_bandwidth_t ngx_rtmp_bw_in;
-
-
- extern ngx_uint_t ngx_rtmp_naccepted;
-+#if (nginx_version >= 1007005)
-+extern ngx_thread_volatile ngx_queue_t ngx_rtmp_init_queue;
-+#else
- extern ngx_thread_volatile ngx_event_t *ngx_rtmp_init_queue;
-+#endif
-
- extern ngx_uint_t ngx_rtmp_max_module;
- extern ngx_module_t ngx_rtmp_core_module;
-diff --git a/ngx_rtmp_play_module.c b/ngx_rtmp_play_module.c
-index acaa46c..f6ea6c3 100644
---- a/ngx_rtmp_play_module.c
-+++ b/ngx_rtmp_play_module.c
-@@ -6,6 +6,7 @@
-
- #include <ngx_config.h>
- #include <ngx_core.h>
-+#include <nginx.h>
- #include "ngx_rtmp_play_module.h"
- #include "ngx_rtmp_cmd_module.h"
- #include "ngx_rtmp_netcall_module.h"
-@@ -430,7 +431,12 @@ ngx_rtmp_play_do_stop(ngx_rtmp_session_t *s)
- ngx_del_timer(&ctx->send_evt);
- }
-
-- if (ctx->send_evt.prev) {
-+#if (nginx_version >= 1007005)
-+ if (ctx->send_evt.posted)
-+#else
-+ if (ctx->send_evt.prev)
-+#endif
-+ {
- ngx_delete_posted_event((&ctx->send_evt));
- }
-