diff --git a/framework/requirements/requirements.php b/framework/requirements/requirements.php
index d515af77fe..d38d7fe885 100644
--- a/framework/requirements/requirements.php
+++ b/framework/requirements/requirements.php
@@ -106,7 +106,7 @@ return array(
array(
'name' => 'IPv6 support',
'mandatory' => false,
- 'condition' => defined('AF_INET6'),
+ 'condition' => strlen(@inet_pton('2001:db8::1')) === 16,
'by' => 'IPv6 expansion in IpValidator',
'memo' => 'When IpValidator::expandIPv6
property is set to true, PHP must support IPv6 protocol stack. Currently PHP constant AF_INET6 is not defined