diff options
author | Anders Kaseorg <andersk@mit.edu> | 2014-09-29 16:28:50 -0400 |
---|---|---|
committer | John Hood <cgull@glup.org> | 2015-05-28 22:49:46 -0400 |
commit | e7903f0de2b93f729fbf6b524145e4d4309c95f3 (patch) | |
tree | 8de0a9f82175365dd4a2614b62a0a9531073e6b9 /scripts | |
parent | 14bdd8f00f5a7e0acbb2a607a5d84ae6c151aaf8 (diff) |
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/mosh.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/mosh.pl b/scripts/mosh.pl index 6a3aea6..8c19138 100755 --- a/scripts/mosh.pl +++ b/scripts/mosh.pl @@ -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; |