From: Peter Eisentraut Date: Tue, 16 Sep 2025 05:23:50 +0000 (+0200) Subject: Fix incorrect const qualifier X-Git-Tag: REL_18_0~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e179115dc04159eb364ffda88fed82e511aff0f7;p=thirdparty%2Fpostgresql.git Fix incorrect const qualifier Commit 7202d72787d added in passing some const qualifiers, but the one on the postmaster_child_launch() startup_data argument was incorrect, because the function itself modifies the pointed-to data. This is hidden from the compiler because of casts. The qualifiers on the functions called by postmaster_child_launch() are still correct. --- diff --git a/src/backend/postmaster/launch_backend.c b/src/backend/postmaster/launch_backend.c index bf6b55ee830..ae94cc99d31 100644 --- a/src/backend/postmaster/launch_backend.c +++ b/src/backend/postmaster/launch_backend.c @@ -227,7 +227,7 @@ PostmasterChildName(BackendType child_type) */ pid_t postmaster_child_launch(BackendType child_type, int child_slot, - const void *startup_data, size_t startup_data_len, + void *startup_data, size_t startup_data_len, ClientSocket *client_sock) { pid_t pid; diff --git a/src/include/postmaster/postmaster.h b/src/include/postmaster/postmaster.h index 92497cd6a0f..753871071ac 100644 --- a/src/include/postmaster/postmaster.h +++ b/src/include/postmaster/postmaster.h @@ -108,7 +108,7 @@ extern PGDLLIMPORT struct ClientSocket *MyClientSocket; /* prototypes for functions in launch_backend.c */ extern pid_t postmaster_child_launch(BackendType child_type, int child_slot, - const void *startup_data, + void *startup_data, size_t startup_data_len, struct ClientSocket *client_sock); const char *PostmasterChildName(BackendType child_type);