summaryrefslogtreecommitdiff
path: root/jpl
diff options
context:
space:
mode:
Diffstat (limited to 'jpl')
-rw-r--r--jpl/JNI/JNI.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/jpl/JNI/JNI.pm b/jpl/JNI/JNI.pm
index 7797ad632a..455a130d9f 100644
--- a/jpl/JNI/JNI.pm
+++ b/jpl/JNI/JNI.pm
@@ -2,6 +2,7 @@ package JNI;
use strict;
use Carp;
+use Errno;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD $JVM @JVM_ARGS $JAVALIB);
require Exporter;
@@ -198,7 +199,7 @@ sub AUTOLOAD {
($constname = $AUTOLOAD) =~ s/.*:://;
my $val = constant($constname, @_ ? $_[0] : 0);
if ($! != 0) {
- if ($! =~ /Invalid/) {
+ if ($!{EINVAL} || $! =~ /Invalid/) {
$AutoLoader::AUTOLOAD = $AUTOLOAD;
goto &AutoLoader::AUTOLOAD;
}