pgsql: libpq: Use strerror_r instead of strerror

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: libpq: Use strerror_r instead of strerror
Date: 2024-07-28 08:29:28
Message-ID: E1sXzHU-001ZlU-9Z@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

libpq: Use strerror_r instead of strerror

Commit 453c4687377 introduced a use of strerror() into libpq, but that
is not thread-safe. Fix by using strerror_r() instead.

In passing, update some of the code comments added by 453c4687377, as
we have learned more about the reason for the change in OpenSSL that
started this.

Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
Discussion: Discussion: https://postgr.es/m/b6fb018b-f05c-4afd-abd3-318c649faf18@highgo.ca

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c53016860b8e9c7d511efa86d6368456340343f5

Modified Files
--------------
src/backend/libpq/be-secure-openssl.c | 9 +++++----
src/interfaces/libpq/fe-secure-openssl.c | 11 ++++++-----
2 files changed, 11 insertions(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2024-07-28 10:23:23 pgsql: Fix incorrect return value for pg_size_pretty(bigint)
Previous Message Bruce Momjian 2024-07-28 08:10:35 pgsql: doc PG 17 relnotes: add "()" to PQsocketPoll mention