Permalink
Browse files

Restore fileno in sys_map

This fixes #76253. non-anonymous sys_map was useable since
e102d03
  • Loading branch information...
1 parent 12f8245 commit cbdb6863b0dce7ae05e5951ea9b9c87de514cd89 @Leont committed Apr 4, 2012
Showing with 3 additions and 1 deletion.
  1. +2 −0 Changes
  2. +1 −1 lib/File/Map.pm
View
@@ -1,6 +1,8 @@
Revision history for File-Map
{{$NEXT}}
+ Restore fileno in sys_map; this fixes #76253: non-anonymous sys_map was useable since e102d034
+
0.46 2012-02-26 17:59:33 Europe/Amsterdam
Fix madvise on cygwin
View
@@ -108,7 +108,7 @@ sub map_anonymous {
sub sys_map { ## no critic (ProhibitManyArgs)
my (undef, $length, $protection, $flags, $fh, $offset) = @_;
my $utf8 = _check_layers($fh);
- my $fd = ($flags & MAP_ANONYMOUS) ? $ANON_FH : $fh;
+ my $fd = ($flags & MAP_ANONYMOUS) ? $ANON_FH : fileno $fh;
$offset ||= 0;
_mmap_impl($_[0], $length, $protection, $flags, $fd, $offset, $utf8);
return;

0 comments on commit cbdb686

Please sign in to comment.