Silence some warnings introduced by #33507
[p5sagit/p5-mst-13.2.git] / ext / IO / t / io_sock.t
index c7a7ccf..24d6818 100755 (executable)
@@ -10,6 +10,11 @@ BEGIN {
 use Config;
 
 BEGIN {
+    my $can_fork = $Config{d_fork} ||
+                   (($^O eq 'MSWin32' || $^O eq 'NetWare') and
+                    $Config{useithreads} and 
+                    $Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/
+                   );
     my $reason;
     if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bSocket\b/) {
        $reason = 'Socket extension unavailable';
@@ -17,8 +22,8 @@ BEGIN {
     elsif ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bIO\b/) {
        $reason = 'IO extension unavailable';
     }
-    elsif (! $Config{'d_fork'}) {
-       $reason = 'no fork';
+    elsif (!$can_fork) {
+        $reason = 'no fork';
     }
     if ($reason) {
        print "1..0 # Skip: $reason\n";