]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwStatic.pm
treewide: run update-copyrights from gnulib for 2019
[public-inbox.git] / lib / PublicInbox / WwwStatic.pm
index 60a71d8d20f007eaa150e7f22866df782c8c7761..0c534b46f0d546cdfd28c35138a3140664acf647 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2016-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # This package can either be a PSGI response body for a static file
@@ -176,9 +176,9 @@ sub getline {
        my $len = $self->{len} or return; # undef, tells server we're done
        my $n = 8192;
        $n = $len if $len < $n;
-       seek($self->{in}, $self->{off}, SEEK_SET) or
-                       die "seek ($self->{path}): $!";
-       my $r = read($self->{in}, my $buf, $n);
+       sysseek($self->{in}, $self->{off}, SEEK_SET) or
+                       die "sysseek ($self->{path}): $!";
+       my $r = sysread($self->{in}, my $buf, $n);
        if (defined $r && $r > 0) { # success!
                $self->{len} = $len - $r;
                $self->{off} += $r;