10 eval { my @n = getnetbyname "loopback" };
11 $hasne = 1 unless $@ && $@ =~ /unimplemented|unsupported/i;
12 unless ($hasne) { print "1..0 # Skip: no getnetbyname\n"; exit 0 }
14 $hasne = 0 unless $Config{'i_netdb'} eq 'define';
15 unless ($hasne) { print "1..0 # Skip: no netdb.h\n"; exit 0 }
19 our @netent = getnetbyname "loopback"; # This is the function getnetbyname.
20 unless (@netent) { print "1..0 # Skip: no loopback net\n"; exit 0 }
29 my $netent = getnetbyname "loopback"; # This is the OO getnetbyname.
31 print "not " unless $netent->name eq $netent[0];
34 # Testing pretty much anything else is unportable;
35 # e.g. the canonical name of the "loopback" net may be "loop".