OBS-URL: https://build.opensuse.org/package/show/server:http/uwsgi?expand=0&rev=139
197 lines
7.5 KiB
Diff
197 lines
7.5 KiB
Diff
|
|
github.com/unbit/uwsgi/pull/2708
|
|
|
|
|
|
From d6542e2129fcec94a18d69af0e8d54c2dec45750 Mon Sep 17 00:00:00 2001
|
|
From: Alexandre Rossi <alexandre.rossi@gmail.com>
|
|
Date: Tue, 18 Feb 2025 08:52:22 +0100
|
|
Subject: [PATCH 1/2] fix build with gcc-15 and -Wincompatible-pointer-types
|
|
|
|
see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098052
|
|
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098054
|
|
---
|
|
core/emperor.c | 2 +-
|
|
core/fifo.c | 48 +++++++++++++++++++-------------------
|
|
core/master_utils.c | 2 +-
|
|
core/spooler.c | 2 +-
|
|
plugins/fiber/fiber.c | 4 ++--
|
|
plugins/pypy/pypy_plugin.c | 2 +-
|
|
6 files changed, 30 insertions(+), 30 deletions(-)
|
|
|
|
diff --git a/core/emperor.c b/core/emperor.c
|
|
index 190f6937a1..ae264d3227 100644
|
|
--- a/core/emperor.c
|
|
+++ b/core/emperor.c
|
|
@@ -598,7 +598,7 @@ static void emperor_massive_reload(int signum) {
|
|
}
|
|
|
|
|
|
-static void emperor_stats() {
|
|
+static void emperor_stats(int signum) {
|
|
|
|
struct uwsgi_instance *c_ui = ui->ui_next;
|
|
|
|
diff --git a/core/fifo.c b/core/fifo.c
|
|
index c020fe4777..6dc142cfe1 100644
|
|
--- a/core/fifo.c
|
|
+++ b/core/fifo.c
|
|
@@ -26,18 +26,18 @@ static char *uwsgi_fifo_by_slot() {
|
|
|
|
#define announce_fifo uwsgi_log_verbose("active master fifo is now %s\n", uwsgi_fifo_by_slot())
|
|
|
|
-static void uwsgi_fifo_set_slot_zero() { uwsgi.master_fifo_slot = 0; announce_fifo; }
|
|
-static void uwsgi_fifo_set_slot_one() { uwsgi.master_fifo_slot = 1; announce_fifo; }
|
|
-static void uwsgi_fifo_set_slot_two() { uwsgi.master_fifo_slot = 2; announce_fifo; }
|
|
-static void uwsgi_fifo_set_slot_three() { uwsgi.master_fifo_slot = 3; announce_fifo; }
|
|
-static void uwsgi_fifo_set_slot_four() { uwsgi.master_fifo_slot = 4; announce_fifo; }
|
|
-static void uwsgi_fifo_set_slot_five() { uwsgi.master_fifo_slot = 5; announce_fifo; }
|
|
-static void uwsgi_fifo_set_slot_six() { uwsgi.master_fifo_slot = 6; announce_fifo; }
|
|
-static void uwsgi_fifo_set_slot_seven() { uwsgi.master_fifo_slot = 7; announce_fifo; }
|
|
-static void uwsgi_fifo_set_slot_eight() { uwsgi.master_fifo_slot = 8; announce_fifo; }
|
|
-static void uwsgi_fifo_set_slot_nine() { uwsgi.master_fifo_slot = 9; announce_fifo; }
|
|
-
|
|
-static void subscriptions_blocker() {
|
|
+static void uwsgi_fifo_set_slot_zero(int signum) { uwsgi.master_fifo_slot = 0; announce_fifo; }
|
|
+static void uwsgi_fifo_set_slot_one(int signum) { uwsgi.master_fifo_slot = 1; announce_fifo; }
|
|
+static void uwsgi_fifo_set_slot_two(int signum) { uwsgi.master_fifo_slot = 2; announce_fifo; }
|
|
+static void uwsgi_fifo_set_slot_three(int signum) { uwsgi.master_fifo_slot = 3; announce_fifo; }
|
|
+static void uwsgi_fifo_set_slot_four(int signum) { uwsgi.master_fifo_slot = 4; announce_fifo; }
|
|
+static void uwsgi_fifo_set_slot_five(int signum) { uwsgi.master_fifo_slot = 5; announce_fifo; }
|
|
+static void uwsgi_fifo_set_slot_six(int signum) { uwsgi.master_fifo_slot = 6; announce_fifo; }
|
|
+static void uwsgi_fifo_set_slot_seven(int signum) { uwsgi.master_fifo_slot = 7; announce_fifo; }
|
|
+static void uwsgi_fifo_set_slot_eight(int signum) { uwsgi.master_fifo_slot = 8; announce_fifo; }
|
|
+static void uwsgi_fifo_set_slot_nine(int signum) { uwsgi.master_fifo_slot = 9; announce_fifo; }
|
|
+
|
|
+static void subscriptions_blocker(int signum) {
|
|
if (uwsgi.subscriptions_blocked) {
|
|
uwsgi_log_verbose("subscriptions re-enabled\n");
|
|
uwsgi.subscriptions_blocked = 0;
|
|
@@ -48,7 +48,7 @@ static void subscriptions_blocker() {
|
|
}
|
|
}
|
|
|
|
-static void emperor_rescan() {
|
|
+static void emperor_rescan(int signum) {
|
|
if (uwsgi.emperor_pid > 0) {
|
|
if (kill(uwsgi.emperor_pid, SIGWINCH)) {
|
|
uwsgi_error("emperor_rescan()/kill()");
|
|
@@ -78,25 +78,25 @@ void uwsgi_master_fifo_prepare() {
|
|
uwsgi_fifo_table['8'] = uwsgi_fifo_set_slot_eight;
|
|
uwsgi_fifo_table['9'] = uwsgi_fifo_set_slot_nine;
|
|
|
|
- uwsgi_fifo_table['-'] = uwsgi_cheaper_decrease;
|
|
- uwsgi_fifo_table['+'] = uwsgi_cheaper_increase;
|
|
- uwsgi_fifo_table['B'] = vassal_sos;
|
|
- uwsgi_fifo_table['c'] = uwsgi_chain_reload;
|
|
- uwsgi_fifo_table['C'] = uwsgi_go_cheap;
|
|
+ uwsgi_fifo_table['-'] = (void (*)(int))uwsgi_cheaper_decrease;
|
|
+ uwsgi_fifo_table['+'] = (void (*)(int))uwsgi_cheaper_increase;
|
|
+ uwsgi_fifo_table['B'] = (void (*)(int))vassal_sos;
|
|
+ uwsgi_fifo_table['c'] = (void (*)(int))uwsgi_chain_reload;
|
|
+ uwsgi_fifo_table['C'] = (void (*)(int))uwsgi_go_cheap;
|
|
uwsgi_fifo_table['E'] = emperor_rescan;
|
|
- uwsgi_fifo_table['f'] = uwsgi_refork_master;
|
|
- uwsgi_fifo_table['l'] = uwsgi_log_reopen;
|
|
- uwsgi_fifo_table['L'] = uwsgi_log_rotate;
|
|
+ uwsgi_fifo_table['f'] = (void (*)(int))uwsgi_refork_master;
|
|
+ uwsgi_fifo_table['l'] = (void (*)(int))uwsgi_log_reopen;
|
|
+ uwsgi_fifo_table['L'] = (void (*)(int))uwsgi_log_rotate;
|
|
uwsgi_fifo_table['p'] = suspend_resume_them_all;
|
|
- uwsgi_fifo_table['P'] = uwsgi_update_pidfiles;
|
|
+ uwsgi_fifo_table['P'] = (void (*)(int))uwsgi_update_pidfiles;
|
|
uwsgi_fifo_table['q'] = gracefully_kill_them_all;
|
|
uwsgi_fifo_table['Q'] = kill_them_all;
|
|
uwsgi_fifo_table['r'] = grace_them_all;
|
|
uwsgi_fifo_table['R'] = reap_them_all;
|
|
uwsgi_fifo_table['s'] = stats;
|
|
uwsgi_fifo_table['S'] = subscriptions_blocker;
|
|
- uwsgi_fifo_table['w'] = uwsgi_reload_workers;
|
|
- uwsgi_fifo_table['W'] = uwsgi_brutally_reload_workers;
|
|
+ uwsgi_fifo_table['w'] = (void (*)(int))uwsgi_reload_workers;
|
|
+ uwsgi_fifo_table['W'] = (void (*)(int))uwsgi_brutally_reload_workers;
|
|
|
|
}
|
|
|
|
diff --git a/core/master_utils.c b/core/master_utils.c
|
|
index 27753d5615..9984a2c104 100644
|
|
--- a/core/master_utils.c
|
|
+++ b/core/master_utils.c
|
|
@@ -2,7 +2,7 @@
|
|
|
|
extern struct uwsgi_server uwsgi;
|
|
|
|
-void worker_wakeup() {
|
|
+void worker_wakeup(int sig) {
|
|
}
|
|
|
|
uint64_t uwsgi_worker_exceptions(int wid) {
|
|
diff --git a/core/spooler.c b/core/spooler.c
|
|
index 3b19ad7cde..c1bc115153 100644
|
|
--- a/core/spooler.c
|
|
+++ b/core/spooler.c
|
|
@@ -12,7 +12,7 @@ static void spooler_manage_task(struct uwsgi_spooler *, char *, char *);
|
|
static uint64_t wakeup = 0;
|
|
|
|
// function to allow waking up the spooler if blocked in event_wait
|
|
-void spooler_wakeup() {
|
|
+void spooler_wakeup(int signum) {
|
|
wakeup++;
|
|
}
|
|
|
|
diff --git a/plugins/fiber/fiber.c b/plugins/fiber/fiber.c
|
|
index ca9191eb64..ff69b1bb51 100644
|
|
--- a/plugins/fiber/fiber.c
|
|
+++ b/plugins/fiber/fiber.c
|
|
@@ -15,12 +15,12 @@ struct uwsgi_option fiber_options[] = {
|
|
};
|
|
|
|
|
|
-VALUE uwsgi_fiber_request() {
|
|
+VALUE uwsgi_fiber_request(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg)) {
|
|
async_schedule_to_req_green();
|
|
return Qnil;
|
|
}
|
|
|
|
-VALUE rb_fiber_schedule_to_req() {
|
|
+VALUE rb_fiber_schedule_to_req(VALUE v) {
|
|
int id = uwsgi.wsgi_req->async_id;
|
|
|
|
if (!uwsgi.wsgi_req->suspended) {
|
|
diff --git a/plugins/pypy/pypy_plugin.c b/plugins/pypy/pypy_plugin.c
|
|
index 98164e61dd..424f598965 100644
|
|
--- a/plugins/pypy/pypy_plugin.c
|
|
+++ b/plugins/pypy/pypy_plugin.c
|
|
@@ -294,7 +294,7 @@ static void uwsgi_pypy_enable_threads() {
|
|
}
|
|
}
|
|
|
|
-static void uwsgi_pypy_init_thread() {
|
|
+static void uwsgi_pypy_init_thread(int sig) {
|
|
if (u_pypy_thread_attach) {
|
|
pthread_mutex_lock(&upypy.attach_thread_lock);
|
|
u_pypy_thread_attach();
|
|
|
|
From 9603cd21ff4cb3eaaeafb71e55df1fe97dafa887 Mon Sep 17 00:00:00 2001
|
|
From: Alexandre Rossi <alexandre.rossi@gmail.com>
|
|
Date: Mon, 7 Apr 2025 10:22:46 +0200
|
|
Subject: [PATCH 2/2] fix build with gcc-15 and
|
|
-Werror=unterminated-string-initialization
|
|
|
|
---
|
|
core/init.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/core/init.c b/core/init.c
|
|
index 20e928fa16..107ef94c06 100644
|
|
--- a/core/init.c
|
|
+++ b/core/init.c
|
|
@@ -3,7 +3,7 @@
|
|
extern struct uwsgi_server uwsgi;
|
|
|
|
struct http_status_codes {
|
|
- const char key[3];
|
|
+ const char key[4];
|
|
const char *message;
|
|
int message_size;
|
|
};
|