summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xemergencyd.pl2
1 files changed, 1 insertions, 1 deletions
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: $!";