diff options
-rw-r--r-- | devel/p5-Sys-Syscall/Makefile | 7 | ||||
-rw-r--r-- | devel/p5-Sys-Syscall/files/patch-lib__Sys__Syscall.pm | 30 |
2 files changed, 36 insertions, 1 deletions
diff --git a/devel/p5-Sys-Syscall/Makefile b/devel/p5-Sys-Syscall/Makefile index 939b1c6240e4..9364fe24fc7f 100644 --- a/devel/p5-Sys-Syscall/Makefile +++ b/devel/p5-Sys-Syscall/Makefile @@ -7,6 +7,7 @@ PORTNAME= Sys-Syscall PORTVERSION= 0.23 +PORTREVISION= 1 CATEGORIES= devel perl5 MASTER_SITES= CPAN MASTER_SITE_SUBDIR= Sys @@ -19,4 +20,8 @@ PERL_CONFIGURE= yes MAN3= Sys::Syscall.3 Sys::README.3 -.include <bsd.port.mk> +.include <bsd.port.pre.mk> +post-patch: + @${RM} ${WRKSRC}/lib/Sys/Syscall.pm.orig + +.include <bsd.port.post.mk> diff --git a/devel/p5-Sys-Syscall/files/patch-lib__Sys__Syscall.pm b/devel/p5-Sys-Syscall/files/patch-lib__Sys__Syscall.pm new file mode 100644 index 000000000000..a47a9270d8b8 --- /dev/null +++ b/devel/p5-Sys-Syscall/files/patch-lib__Sys__Syscall.pm @@ -0,0 +1,30 @@ +--- lib/Sys/Syscall.pm.orig 2010-04-18 17:51:10.000000000 -0800 ++++ lib/Sys/Syscall.pm 2012-04-09 08:39:07.000000000 -0800 +@@ -2,7 +2,7 @@ + + package Sys::Syscall; + use strict; +-use POSIX qw(ENOSYS SEEK_CUR); ++use POSIX qw(ENOSYS EAGAIN SEEK_CUR); + use Config; + + require Exporter; +@@ -180,12 +180,14 @@ + 0, # struct sf_hdtr *hdtr + $sbytes_buf, # off_t *sbytes + 0); # flags +- return $rv if $rv < 0; ++ return $rv if $rv < 0 && $! != EAGAIN; + + +- my $set = unpack("L", $sbytes_buf); +- POSIX::lseek($_[1]+0, SEEK_CUR, $set); +- return $set; ++ if (my $set = unpack("L", $sbytes_buf)) { ++ POSIX::lseek($_[1]+0, $set, SEEK_CUR); ++ return $set; ++ } ++ return $rv < 0 ? $rv : 0; + } + + |