mod_http2/Solution-to-version-building.patch

35 lines
1.2 KiB
Diff
Raw Normal View History

2023-02-20 15:47:52 +08:00
From 071c00d2edd14ea573f8e4b2c1a827a26de01749 Mon Sep 17 00:00:00 2001
From: Stefan Eissing <stefan@eissing.org>
Date: Thu, 16 Feb 2023 14:45:12 +0100
Subject: [PATCH] Workaround for building with older httpd versions that lack
ap_thread_create().
---
mod_http2/h2_workers.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/mod_http2/h2_workers.c b/mod_http2/h2_workers.c
index e7e2039..192dbc0 100644
--- a/mod_http2/h2_workers.c
+++ b/mod_http2/h2_workers.c
#The source of this patch is https://github.com/icing/mod_h2/commit/071c00d2edd14ea573f8e4b2c1a827a26de01749
#The reason for joining this patch is that the version released by the native community has not modified this content,
#and the modified version has not been released.
@@ -131,8 +131,13 @@ static apr_status_t activate_slot(h2_workers *workers)
apr_pool_tag(pool, "h2_worker_slot");
slot->pool = pool;
+#if defined(AP_HAS_THREAD_LOCAL)
rv = ap_thread_create(&slot->thread, workers->thread_attr,
slot_run, slot, slot->pool);
+#else
+ rv = apr_thread_create(&slot->thread, workers->thread_attr,
+ slot_run, slot, slot->pool);
+#endif
cleanup:
if (rv != APR_SUCCESS) {
--
2.33.0