all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 6e6bd879810735bb2867d76afab92f6e12dbae86 831 bytes (raw)
name: gnu/packages/patches/php-fix-streams-copy-length.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
Submitted upstream as https://github.com/php/php-src/pull/10538.

From ee775be9af6fe4de7a5a1b6535cc6a319b87af90 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Tue, 7 Feb 2023 22:35:00 +0100
Subject: [PATCH] Fix streams copy length after partial copy_file_range.

---
 main/streams/streams.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/main/streams/streams.c b/main/streams/streams.c
index 20029fc73e..34fd794136 100644
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -1626,6 +1626,9 @@ PHPAPI zend_result _php_stream_copy_to_stream_ex(php_stream *src, php_stream *de
 	}
 #endif // HAVE_COPY_FILE_RANGE
 
+    // If we are falling back, remove read bytes from the total size to copy
+    maxlen -= haveread;
+
 	if (maxlen == PHP_STREAM_COPY_ALL) {
 		maxlen = 0;
 	}
-- 
2.38.1


debug log:

solving 6e6bd87981 ...
found 6e6bd87981 in https://yhetil.org/guix/6d0031e6771c029bb38afea64518726abbb6e4a2.1675806353.git.julien@lepiller.eu/

applying [1/1] https://yhetil.org/guix/6d0031e6771c029bb38afea64518726abbb6e4a2.1675806353.git.julien@lepiller.eu/
diff --git a/gnu/packages/patches/php-fix-streams-copy-length.patch b/gnu/packages/patches/php-fix-streams-copy-length.patch
new file mode 100644
index 0000000000..6e6bd87981

1:23: space before tab in indent.
 	}
1:25: trailing whitespace.
 
1:29: space before tab in indent.
 	if (maxlen == PHP_STREAM_COPY_ALL) {
1:30: space before tab in indent.
 		maxlen = 0;
1:31: space before tab in indent.
 	}
Checking patch gnu/packages/patches/php-fix-streams-copy-length.patch...
Applied patch gnu/packages/patches/php-fix-streams-copy-length.patch cleanly.
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.

index at:
100644 6e6bd879810735bb2867d76afab92f6e12dbae86	gnu/packages/patches/php-fix-streams-copy-length.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.