diff options
author | Karl Williamson <khw@cpan.org> | 2022-04-18 10:48:23 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-04-19 21:25:16 -0600 |
commit | 9b91675263362c97438a0aa1b4dfa1d2573d1536 (patch) | |
tree | a2e1f83e77d891b27d8b623316265d196c32c9a6 /cpan/Socket | |
parent | 058610522241b92628ff971c10cc42e5d5362da9 (diff) | |
download | perl-9b91675263362c97438a0aa1b4dfa1d2573d1536.tar.gz |
Socket: getnameinfo() behaves differently on z/OS
POSIX says at least one of the parameters must be non-NULL. z/OS
requires both to be.
It would be better to have a Configure probe for this, but this is the
first non-conforming OS we have found, and at this stage, there aren't
likely to be any others that Perl might eventually be ported to. Should
some come along, a probe could be added at that time.
Diffstat (limited to 'cpan/Socket')
-rw-r--r-- | cpan/Socket/Socket.pm | 2 | ||||
-rw-r--r-- | cpan/Socket/Socket.xs | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/cpan/Socket/Socket.pm b/cpan/Socket/Socket.pm index a1b7711db2..5087ffc60c 100644 --- a/cpan/Socket/Socket.pm +++ b/cpan/Socket/Socket.pm @@ -3,7 +3,7 @@ package Socket; use strict; { use v5.6.1; } -our $VERSION = '2.032'; +our $VERSION = '2.033'; =head1 NAME diff --git a/cpan/Socket/Socket.xs b/cpan/Socket/Socket.xs index b9385629c3..b4bccb796d 100644 --- a/cpan/Socket/Socket.xs +++ b/cpan/Socket/Socket.xs @@ -733,8 +733,13 @@ static void xs_getnameinfo(pTHX_ CV *cv) #endif err = getnameinfo((struct sockaddr *)sa, addr_len, - want_host ? host : NULL, want_host ? sizeof(host) : 0, - want_serv ? serv : NULL, want_serv ? sizeof(serv) : 0, +#ifdef OS390 /* This OS requires both parameters to be non-NULL */ + host, sizeof(host), + serv, sizeof(serv), +#else + want_host ? host : NULL, want_host ? sizeof(host) : 0, + want_serv ? serv : NULL, want_serv ? sizeof(serv) : 0, +#endif flags); Safefree(sa); |