You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by km...@apache.org on 2018/08/25 23:12:02 UTC
svn commit: r1839142 - /spamassassin/trunk/spamd/spamd.raw
Author: kmcgrail
Date: Sat Aug 25 23:12:02 2018
New Revision: 1839142
URL: http://svn.apache.org/viewvc?rev=1839142&view=rev
Log:
changing socket handling for spamd - bug 7274
Modified:
spamassassin/trunk/spamd/spamd.raw
Modified: spamassassin/trunk/spamd/spamd.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamd/spamd.raw?rev=1839142&r1=1839141&r2=1839142&view=diff
==============================================================================
--- spamassassin/trunk/spamd/spamd.raw (original)
+++ spamassassin/trunk/spamd/spamd.raw Sat Aug 25 23:12:02 2018
@@ -43,11 +43,6 @@ our ($have_getaddrinfo_in_core, $have_ge
# don't force requirement on IO::Socket::IP or IO::Socket::INET6
BEGIN {
- use Socket qw(:DEFAULT IPPROTO_TCP);
-
- # AUTOLOADing 'constants' here enables inlining - see Exporter man page
- &SOCK_STREAM; &IPPROTO_TCP; &SOMAXCONN;
-
$have_getaddrinfo_in_core = eval {
# The Socket module (1.94) bundled with Perl 5.14.* provides
# new affordances for IPv6, including implementations of the
@@ -59,7 +54,9 @@ BEGIN {
Socket->VERSION(1.96); # provides NIx_NOSERV, and Exporter tag :addrinfo
# Socket->VERSION(1.97); # IO::Socket::IP depends on Socket 1.97
import Socket qw(/^(?:AI|NI|NIx|EAI)_/);
- &AI_ADDRCONFIG; &AI_PASSIVE; # enable inlining
+
+ # AUTOLOADing 'constants' here enables inlining - see Exporter man page
+ &AI_ADDRCONFIG; &AI_PASSIVE;
&NI_NUMERICHOST, &NI_NUMERICSERV; &NIx_NOSERV; 1;
};
@@ -72,6 +69,11 @@ BEGIN {
&NI_NUMERICHOST; &NI_NUMERICSERV; &NI_NAMEREQD; 1;
};
+ require Socket;
+ import Socket qw(:DEFAULT IPPROTO_TCP);
+
+ &SOCK_STREAM; &IPPROTO_TCP; &SOMAXCONN; # enable inlining
+
&AF_UNSPEC; &AF_INET; &AF_INET6; # enable inlining
$ai_addrconfig_flag = 0;