aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2012-05-05 04:44:18 +0800
committerswills <swills@FreeBSD.org>2012-05-05 04:44:18 +0800
commite710f250a0f27e6bb17a9500f03dd01f54261160 (patch)
treecbd69608018cd3e2c65b01db84646923a3a755bd /devel
parentf61ec60650118b47ef6074f956110fea798ebbc8 (diff)
downloadfreebsd-ports-gnome-e710f250a0f27e6bb17a9500f03dd01f54261160.tar.gz
freebsd-ports-gnome-e710f250a0f27e6bb17a9500f03dd01f54261160.tar.zst
freebsd-ports-gnome-e710f250a0f27e6bb17a9500f03dd01f54261160.zip
- Fix Sendfile
PR: ports/166797 Submitted by: Mel Flynn <rflynn@acsalaska.net> Obtained from: https://rt.cpan.org/Public/Bug/Display.html?id=17326
Diffstat (limited to 'devel')
-rw-r--r--devel/p5-Sys-Syscall/Makefile7
-rw-r--r--devel/p5-Sys-Syscall/files/patch-lib__Sys__Syscall.pm30
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;
+ }
+
+