aboutsummaryrefslogtreecommitdiff
path: root/www/freenginx-devel/files
diff options
context:
space:
mode:
Diffstat (limited to 'www/freenginx-devel/files')
-rw-r--r--www/freenginx-devel/files/extra-patch-ngx_http_lua_subrequest.c26
-rw-r--r--www/freenginx-devel/files/extra-patch-ngx_http_lua_time.c24
-rw-r--r--www/freenginx-devel/files/extra-patch-ngx_http_upload_module.c26
-rw-r--r--www/freenginx-devel/files/extra-patch-ngx_http_vhost_traffic_status_module.c14
-rw-r--r--www/freenginx-devel/files/extra-patch-passenger-Configuration.c20
5 files changed, 60 insertions, 50 deletions
diff --git a/www/freenginx-devel/files/extra-patch-ngx_http_lua_subrequest.c b/www/freenginx-devel/files/extra-patch-ngx_http_lua_subrequest.c
deleted file mode 100644
index 16a33862ee26..000000000000
--- a/www/freenginx-devel/files/extra-patch-ngx_http_lua_subrequest.c
+++ /dev/null
@@ -1,26 +0,0 @@
---- ../lua-nginx-module-0.10.29/src/ngx_http_lua_subrequest.c.orig 2025-11-01 23:46:33.237622000 -0400
-+++ ../lua-nginx-module-0.10.29/src/ngx_http_lua_subrequest.c 2025-11-01 23:52:42.602198000 -0400
-@@ -1373,7 +1373,9 @@
- ngx_str_t *uri, ngx_str_t *args, ngx_http_request_t **psr,
- ngx_http_post_subrequest_t *ps, ngx_uint_t flags)
- {
-+#if !defined freenginx
- ngx_time_t *tp;
-+#endif
- ngx_connection_t *c;
- ngx_http_request_t *sr;
- ngx_http_core_srv_conf_t *cscf;
-@@ -1501,9 +1503,13 @@
- sr->subrequests = r->subrequests - 1;
- #endif
-
-+#if defined freenginx
-+ sr->start_time = ngx_current_msec;
-+#else
- tp = ngx_timeofday();
- sr->start_sec = tp->sec;
- sr->start_msec = tp->msec;
-+#endif
-
- r->main->count++;
-
diff --git a/www/freenginx-devel/files/extra-patch-ngx_http_lua_time.c b/www/freenginx-devel/files/extra-patch-ngx_http_lua_time.c
deleted file mode 100644
index cc330b2e3c5c..000000000000
--- a/www/freenginx-devel/files/extra-patch-ngx_http_lua_time.c
+++ /dev/null
@@ -1,24 +0,0 @@
---- ../lua-nginx-module-0.10.29/src/ngx_http_lua_time.c.orig 2025-01-17 00:24:35.000000000 -0500
-+++ ../lua-nginx-module-0.10.29/src/ngx_http_lua_time.c 2025-11-02 00:11:45.551096000 -0400
-@@ -28,7 +28,21 @@
- double
- ngx_http_lua_ffi_req_start_time(ngx_http_request_t *r)
- {
-+#if defined freenginx
-+ ngx_time_t *tp;
-+
-+ tp = ngx_timeofday();
-+ tp->sec -= (ngx_current_msec - r->start_time) / 1000;
-+ tp->msec -= (ngx_current_msec - r->start_time) % 1000;
-+ if (tp->msec > NGX_MAX_INT_T_VALUE) {
-+ tp->msec += 1000;
-+ tp->sec -= 1;
-+ }
-+
-+ return tp->sec + tp->msec / 1000.0;
-+#else
- return r->start_sec + r->start_msec / 1000.0;
-+#endif
- }
-
-
diff --git a/www/freenginx-devel/files/extra-patch-ngx_http_upload_module.c b/www/freenginx-devel/files/extra-patch-ngx_http_upload_module.c
new file mode 100644
index 000000000000..36649990a8f0
--- /dev/null
+++ b/www/freenginx-devel/files/extra-patch-ngx_http_upload_module.c
@@ -0,0 +1,26 @@
+--- ../nginx-upload-module-96e6460/ngx_http_upload_module.c.orig 2025-11-02 20:25:39.277074000 -0500
++++ ../nginx-upload-module-96e6460/ngx_http_upload_module.c 2025-11-02 20:31:22.912698000 -0500
+@@ -989,7 +989,11 @@
+ if (u->limit_rate) {
+ remaining = ((ssize_t) r->headers_in.content_length_n) - u->received;
+ next_buf_size = (buf_read_size > remaining) ? remaining : buf_read_size;
++#if defined freenginx && nginx_version >= 1029000
++ limit = u->limit_rate * (ngx_time() - ((ngx_current_msec - r->start_time) / 1000) + 1) - (u->received + next_buf_size);
++#else
+ limit = u->limit_rate * (ngx_time() - r->start_sec + 1) - (u->received + next_buf_size);
++#endif
+ if (limit < 0) {
+ rev->delayed = 1;
+ ngx_add_timer(rev, (ngx_msec_t) ((limit * -1000 / u->limit_rate) + 1));
+@@ -3370,7 +3373,11 @@
+ }
+
+ if (u->limit_rate) {
++#if defined freenginx && nginx_version >= 1029000
++ limit = u->limit_rate * (ngx_time() - ((ngx_current_msec - r->start_time) / 1000) + 1) - u->received;
++#else
+ limit = u->limit_rate * (ngx_time() - r->start_sec + 1) - u->received;
++#endif
+
+ if (limit < 0) {
+ c->read->delayed = 1;
diff --git a/www/freenginx-devel/files/extra-patch-ngx_http_vhost_traffic_status_module.c b/www/freenginx-devel/files/extra-patch-ngx_http_vhost_traffic_status_module.c
new file mode 100644
index 000000000000..50eca3992c88
--- /dev/null
+++ b/www/freenginx-devel/files/extra-patch-ngx_http_vhost_traffic_status_module.c
@@ -0,0 +1,14 @@
+--- ../nginx-module-vts-c382342/src/ngx_http_vhost_traffic_status_module.c.orig 2025-11-02 09:49:45.010029000 -0500
++++ ../nginx-module-vts-c382342/src/ngx_http_vhost_traffic_status_module.c 2025-11-02 09:56:01.011946000 -0500
+@@ -354,7 +354,11 @@
+ tp = ngx_timeofday();
+
+ ms = (ngx_msec_int_t)
++#if (defined freenginx && nginx_version >= 1029000)
++ (tp->sec * 1000 + tp->msec - r->start_time);
++#else
+ ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec));
++#endif
+ return ngx_max(ms, 0);
+ }
+
diff --git a/www/freenginx-devel/files/extra-patch-passenger-Configuration.c b/www/freenginx-devel/files/extra-patch-passenger-Configuration.c
new file mode 100644
index 000000000000..1c53ea086717
--- /dev/null
+++ b/www/freenginx-devel/files/extra-patch-passenger-Configuration.c
@@ -0,0 +1,20 @@
+--- ../passenger-6.0.27/src/nginx_module/Configuration.c.orig 2013-10-26 20:00:00.000000000 -0400
++++ ../passenger-6.0.27/src/nginx_module/Configuration.c 2025-11-02 20:09:05.651562000 -0500
+@@ -224,7 +224,7 @@
+
+ conf->upstream_config.send_lowat = NGX_CONF_UNSET_SIZE;
+ conf->upstream_config.buffer_size = NGX_CONF_UNSET_SIZE;
+- #if NGINX_VERSION_NUM >= 1027000
++ #if NGINX_VERSION_NUM >= 1027000 && !defined freenginx
+ conf->upstream_config.limit_rate = NGX_CONF_UNSET_PTR;
+ #elif NGINX_VERSION_NUM >= 1007007
+ conf->upstream_config.limit_rate = NGX_CONF_UNSET_SIZE;
+@@ -467,7 +467,7 @@
+ prev->upstream_config.buffer_size,
+ 16 * 1024);
+
+- #if NGINX_VERSION_NUM >= 1027000
++ #if NGINX_VERSION_NUM >= 1027000 && !defined freenginx
+ ngx_conf_merge_ptr_value(conf->upstream_config.limit_rate,
+ prev->upstream_config.limit_rate, NULL);
+ #elif NGINX_VERSION_NUM >= 1007007