summaryrefslogtreecommitdiff
path: root/ext/Socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Socket')
-rwxr-xr-xext/Socket/Socket.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/Socket/Socket.t b/ext/Socket/Socket.t
index 4dbc480ef1..c06b9e7a84 100755
--- a/ext/Socket/Socket.t
+++ b/ext/Socket/Socket.t
@@ -26,7 +26,8 @@ if (socket(T,PF_INET,SOCK_STREAM,6)) {
print "ok 1\n";
arm(5);
- if ($has_echo && connect(T,pack_sockaddr_in(7,inet_aton("localhost")))){
+ my $host = $^O eq 'MacOS' ? '127.0.0.1' : 'localhost';
+ if ($has_echo && connect(T,pack_sockaddr_in(7,inet_aton($host)))){
arm(0);
print "ok 2\n";