We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 69b76df + a6f2666 commit 75968d6Copy full SHA for 75968d6
library/std/src/sys/fd/unix.rs
@@ -37,10 +37,10 @@ pub struct FileDesc(OwnedFd);
37
//
38
// On Apple targets however, apparently the 64-bit libc is either buggy or
39
// intentionally showing odd behavior by rejecting any read with a size
40
-// larger than or equal to INT_MAX. To handle both of these the read
41
-// size is capped on both platforms.
+// larger than INT_MAX. To handle both of these the read size is capped on
+// both platforms.
42
const READ_LIMIT: usize = if cfg!(target_vendor = "apple") {
43
- libc::c_int::MAX as usize - 1
+ libc::c_int::MAX as usize
44
} else {
45
libc::ssize_t::MAX as usize
46
};
0 commit comments