aboutsummaryrefslogtreecommitdiffstats
path: root/pullimap
diff options
context:
space:
mode:
Diffstat (limited to 'pullimap')
-rwxr-xr-xpullimap5
1 files changed, 2 insertions, 3 deletions
diff --git a/pullimap b/pullimap
index 3d1a0ec..1dc4b9e 100755
--- a/pullimap
+++ b/pullimap
@@ -29,7 +29,7 @@ use Errno 'EINTR';
use Fcntl qw/O_CREAT O_RDWR O_DSYNC F_SETLK F_WRLCK SEEK_SET F_GETFD F_SETFD FD_CLOEXEC/;
use Getopt::Long qw/:config posix_default no_ignore_case gnu_getopt auto_version/;
use List::Util 'first';
-use Socket qw/PF_INET PF_INET6 SOCK_STREAM/;
+use Socket qw/PF_INET PF_INET6 SOCK_STREAM IPPROTO_TCP/;
use lib 'lib';
use Net::IMAP::InterIMAP 0.0.5 qw/xdg_basedir read_config compact_set/;
@@ -146,8 +146,7 @@ sub sendmail($$) {
: $fam == PF_INET6 ? Socket::pack_sockaddr_in6($port, $addr)
: die;
- my $proto = getprotobyname("tcp") // die;
- socket($SMTP, $fam, SOCK_STREAM, $proto) or die "socket: $!";
+ socket($SMTP, $fam, SOCK_STREAM, IPPROTO_TCP) or die "socket: $!";
until (connect($SMTP, $sockaddr)) {
next if $! == EINTR; # try again if connect(2) was interrupted by a signal
die "connect: $!";