diff options
Diffstat (limited to 'ext/Fcntl/Fcntl.pm')
-rw-r--r-- | ext/Fcntl/Fcntl.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm index 00f834d223..664c2cb28d 100644 --- a/ext/Fcntl/Fcntl.pm +++ b/ext/Fcntl/Fcntl.pm @@ -44,6 +44,7 @@ what constants are implemented in your system. use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD); +use Errno; require Exporter; require DynaLoader; @ISA = qw(Exporter DynaLoader); @@ -122,7 +123,7 @@ sub AUTOLOAD { (my $constname = $AUTOLOAD) =~ s/.*:://; my $val = constant($constname, 0); if ($! != 0) { - if ($! =~ /Invalid/) { + if ($!{EINVAL} || $! =~ /Invalid/) { $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD; } |