scripts/mosh: Allow IO::Socket::INET6 as an alternative to IO::Socket::IP

Some systems have IO::Socket::INET6 preinstalled, so we might as well
accept either.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2014-09-29 16:28:50 -04:00
committed by John Hood
parent 14bdd8f00f
commit e7903f0de2
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -172,7 +172,10 @@ if ( not defined $bind_ip or $bind_ip =~ m{^ssh$}i ) {
if ( defined $fake_proxy ) {
use Errno qw(EINTR);
BEGIN { eval { require IO::Socket::IP; IO::Socket::IP->import('-register'); }; }
BEGIN {
eval { require IO::Socket::IP; IO::Socket::IP->import('-register'); 1 } or
eval { require IO::Socket::INET6 };
}
use POSIX qw(_exit);
my ( $host, $port ) = @ARGV;