pgsql: Avoid use of Perl getprotobyname

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid use of Perl getprotobyname
Date: 2023-08-23 19:01:23
Message-ID: E1qYt6Z-000WTo-13@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid use of Perl getprotobyname

getprotobyname returns undefined on some CI machines. It's not clear
why. The code overall still works, but it raises a warning.

In PostgreSQL C code, we always call socket() with 0 for the protocol
argument, so we should be able to do the same in Perl (since the Perl
documentation says that the arguments of the socket function are the
same as in C). So do that, to avoid the issue.

Reviewed-by: Andrew Dunstan <andrew(at)dunslane(dot)net>
Discussion: https://www.postgresql.org/message-id/flat/06f899fd-1826-05ab-42d6-adeb1fd5e200%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/01226c682ce6cc130c1057fcd5b0f24b2b622d39

Modified Files
--------------
src/test/perl/PostgreSQL/Test/Cluster.pm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2023-08-23 20:31:02 Re: pgsql: Add to_bin() and to_oct().
Previous Message Heikki Linnakangas 2023-08-23 15:13:03 pgsql: Fix _bt_allequalimage() call within critical section.