From bce18ef3c67be63ad2dd8d585260dcb813f5a525 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 16 Sep 2025 07:23:50 +0200 Subject: [PATCH] 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. --- src/backend/postmaster/launch_backend.c | 2 +- src/include/postmaster/postmaster.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/postmaster/launch_backend.c b/src/backend/postmaster/launch_backend.c index c5ef14e1eaa..79708e59259 100644 --- a/src/backend/postmaster/launch_backend.c +++ b/src/backend/postmaster/launch_backend.c @@ -229,7 +229,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); -- 2.39.5