From 0ee8db29286983511adc1c9ed3ae64ff4ee1f0b3 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Mon, 22 Feb 2010 14:31:43 +0100 Subject: Use a way to check for the existence of IPV6_V6ONLY that actually works. (Thanks, Cigaes, for this one.) --- emergencyd.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emergencyd.pl b/emergencyd.pl index 5766484..7314324 100755 --- a/emergencyd.pl +++ b/emergencyd.pl @@ -97,7 +97,7 @@ if ( defined($opts{p}) ) { my $socket; socket $socket, PF_INET6, SOCK_DGRAM, $proto or die "Can't create socket: $!"; -if ( defined(IPV6_V6ONLY) ) { +if ( defined(*IPV6_V6ONLY{CODE}) ) { setsockopt $socket, IPPROTO_IPV6, IPV6_V6ONLY, 0 or die "Can't set IPV6_V6ONLY option to 0: $!"; } bind $socket, sockaddr_in6($port, in6addr_any) or die "Can't bind socket: $!"; -- cgit v1.2.3