Subject: | [PATCH] AIX 5 needs port zero |
In AIX 5 the IO::Socket::IP tests die:
http://www.nntp.perl.org/group/perl.daily-build.reports/2014/08/msg166050.html
http://doc.procura.nl/smoke/aix5300/511/cc/mktest.rpt
unless the server socket is bound to port zero (i.e. give me any port).
The attached patch seemed to work for Michael Felt (the first report above).
Subject: | 0001-Bind-to-local-port-zero.patch |
From c08882121a3fed7d101c4e617911a1a7581117fc Mon Sep 17 00:00:00 2001
From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Fri, 5 Sep 2014 07:10:17 -0400
Subject: [PATCH] Bind to local port zero.
Seems to help in AIX: patch from Michael Felt.
---
cpan/IO-Socket-IP/t/02local-server-v4.t | 1 +
cpan/IO-Socket-IP/t/03local-cross-v4.t | 1 +
cpan/IO-Socket-IP/t/05local-server-v6.t | 1 +
cpan/IO-Socket-IP/t/06local-cross-v6.t | 1 +
4 files changed, 4 insertions(+)
diff --git a/cpan/IO-Socket-IP/t/02local-server-v4.t b/cpan/IO-Socket-IP/t/02local-server-v4.t
index d1f2b40..bca5b83 100644
--- a/cpan/IO-Socket-IP/t/02local-server-v4.t
+++ b/cpan/IO-Socket-IP/t/02local-server-v4.t
@@ -27,6 +27,7 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) {
my $testserver = IO::Socket::IP->new(
( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ),
LocalHost => "127.0.0.1",
+ Port => 0,
Type => Socket->$socktype,
);
diff --git a/cpan/IO-Socket-IP/t/03local-cross-v4.t b/cpan/IO-Socket-IP/t/03local-cross-v4.t
index 532b78c..4d75d95 100644
--- a/cpan/IO-Socket-IP/t/03local-cross-v4.t
+++ b/cpan/IO-Socket-IP/t/03local-cross-v4.t
@@ -11,6 +11,7 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) {
my $testserver = IO::Socket::IP->new(
( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ),
LocalHost => "127.0.0.1",
+ Port => 0,
Type => Socket->$socktype,
) or die "Cannot listen on PF_INET - $@";
diff --git a/cpan/IO-Socket-IP/t/05local-server-v6.t b/cpan/IO-Socket-IP/t/05local-server-v6.t
index 22ee59e..27664b6 100644
--- a/cpan/IO-Socket-IP/t/05local-server-v6.t
+++ b/cpan/IO-Socket-IP/t/05local-server-v6.t
@@ -33,6 +33,7 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) {
my $testserver = IO::Socket::IP->new(
( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ),
LocalHost => "::1",
+ Port => 0,
Type => Socket->$socktype,
GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG
);
diff --git a/cpan/IO-Socket-IP/t/06local-cross-v6.t b/cpan/IO-Socket-IP/t/06local-cross-v6.t
index c4842b7..8d40f4a 100644
--- a/cpan/IO-Socket-IP/t/06local-cross-v6.t
+++ b/cpan/IO-Socket-IP/t/06local-cross-v6.t
@@ -14,6 +14,7 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) {
my $testserver = IO::Socket::IP->new(
( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ),
LocalHost => "::1",
+ Port => 0,
Type => Socket->$socktype,
) or die "Cannot listen on PF_INET6 - $@";
--
2.1.0