summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/files/0001-Do-not-use-LFS64-on-linux-with-musl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rust/files/0001-Do-not-use-LFS64-on-linux-with-musl.patch')
-rw-r--r--meta/recipes-devtools/rust/files/0001-Do-not-use-LFS64-on-linux-with-musl.patch54
1 files changed, 25 insertions, 29 deletions
diff --git a/meta/recipes-devtools/rust/files/0001-Do-not-use-LFS64-on-linux-with-musl.patch b/meta/recipes-devtools/rust/files/0001-Do-not-use-LFS64-on-linux-with-musl.patch
index da72665bbd..77f22f42b6 100644
--- a/meta/recipes-devtools/rust/files/0001-Do-not-use-LFS64-on-linux-with-musl.patch
+++ b/meta/recipes-devtools/rust/files/0001-Do-not-use-LFS64-on-linux-with-musl.patch
@@ -19,10 +19,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
19 library/std/src/sys/unix/fs.rs | 27 ++++++++++++++++++++------- 19 library/std/src/sys/unix/fs.rs | 27 ++++++++++++++++++++-------
20 3 files changed, 38 insertions(+), 12 deletions(-) 20 3 files changed, 38 insertions(+), 12 deletions(-)
21 21
22diff --git a/library/std/src/os/linux/fs.rs b/library/std/src/os/linux/fs.rs 22Index: rustc-1.69.0-src/library/std/src/os/linux/fs.rs
23index 479bbcc17a8..ab0b2a3eda3 100644 23===================================================================
24--- a/library/std/src/os/linux/fs.rs 24--- rustc-1.69.0-src.orig/library/std/src/os/linux/fs.rs
25+++ b/library/std/src/os/linux/fs.rs 25+++ rustc-1.69.0-src/library/std/src/os/linux/fs.rs
26@@ -329,7 +329,14 @@ pub trait MetadataExt { 26@@ -329,7 +329,14 @@ pub trait MetadataExt {
27 impl MetadataExt for Metadata { 27 impl MetadataExt for Metadata {
28 #[allow(deprecated)] 28 #[allow(deprecated)]
@@ -39,11 +39,11 @@ index 479bbcc17a8..ab0b2a3eda3 100644
39 } 39 }
40 fn st_dev(&self) -> u64 { 40 fn st_dev(&self) -> u64 {
41 self.as_inner().as_inner().st_dev as u64 41 self.as_inner().as_inner().st_dev as u64
42diff --git a/library/std/src/sys/unix/fd.rs b/library/std/src/sys/unix/fd.rs 42Index: rustc-1.69.0-src/library/std/src/sys/unix/fd.rs
43index dbaa3c33e2e..5d31557bd11 100644 43===================================================================
44--- a/library/std/src/sys/unix/fd.rs 44--- rustc-1.69.0-src.orig/library/std/src/sys/unix/fd.rs
45+++ b/library/std/src/sys/unix/fd.rs 45+++ rustc-1.69.0-src/library/std/src/sys/unix/fd.rs
46@@ -115,9 +115,12 @@ pub fn read_to_end(&self, buf: &mut Vec<u8>) -> io::Result<usize> { 46@@ -121,9 +121,12 @@ impl FileDesc {
47 } 47 }
48 48
49 pub fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result<usize> { 49 pub fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result<usize> {
@@ -58,7 +58,7 @@ index dbaa3c33e2e..5d31557bd11 100644
58 use libc::pread64; 58 use libc::pread64;
59 59
60 unsafe { 60 unsafe {
61@@ -181,9 +184,12 @@ pub fn is_write_vectored(&self) -> bool { 61@@ -276,9 +279,12 @@ impl FileDesc {
62 } 62 }
63 63
64 pub fn write_at(&self, buf: &[u8], offset: u64) -> io::Result<usize> { 64 pub fn write_at(&self, buf: &[u8], offset: u64) -> io::Result<usize> {
@@ -73,11 +73,11 @@ index dbaa3c33e2e..5d31557bd11 100644
73 use libc::pwrite64; 73 use libc::pwrite64;
74 74
75 unsafe { 75 unsafe {
76diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs 76Index: rustc-1.69.0-src/library/std/src/sys/unix/fs.rs
77index aea0c26ee8b..e7be4729ca6 100644 77===================================================================
78--- a/library/std/src/sys/unix/fs.rs 78--- rustc-1.69.0-src.orig/library/std/src/sys/unix/fs.rs
79+++ b/library/std/src/sys/unix/fs.rs 79+++ rustc-1.69.0-src/library/std/src/sys/unix/fs.rs
80@@ -45,19 +45,24 @@ 80@@ -46,9 +46,13 @@ use libc::{c_int, mode_t};
81 all(target_os = "linux", target_env = "gnu") 81 all(target_os = "linux", target_env = "gnu")
82 ))] 82 ))]
83 use libc::c_char; 83 use libc::c_char;
@@ -93,12 +93,11 @@ index aea0c26ee8b..e7be4729ca6 100644
93 use libc::fstatat64; 93 use libc::fstatat64;
94 #[cfg(any( 94 #[cfg(any(
95 target_os = "android", 95 target_os = "android",
96 target_os = "solaris", 96@@ -57,9 +61,10 @@ use libc::fstatat64;
97 target_os = "fuchsia",
98 target_os = "redox", 97 target_os = "redox",
99- target_os = "illumos" 98 target_os = "illumos",
100+ target_os = "illumos", 99 target_os = "nto",
101+ target_env = "musl" 100+ target_env = "musl",
102 ))] 101 ))]
103 use libc::readdir as readdir64; 102 use libc::readdir as readdir64;
104-#[cfg(target_os = "linux")] 103-#[cfg(target_os = "linux")]
@@ -106,7 +105,7 @@ index aea0c26ee8b..e7be4729ca6 100644
106 use libc::readdir64; 105 use libc::readdir64;
107 #[cfg(any(target_os = "emscripten", target_os = "l4re"))] 106 #[cfg(any(target_os = "emscripten", target_os = "l4re"))]
108 use libc::readdir64_r; 107 use libc::readdir64_r;
109@@ -77,7 +82,13 @@ 108@@ -80,7 +85,13 @@ use libc::{
110 dirent as dirent64, fstat as fstat64, fstatat as fstatat64, ftruncate64, lseek64, 109 dirent as dirent64, fstat as fstat64, fstatat as fstatat64, ftruncate64, lseek64,
111 lstat as lstat64, off64_t, open as open64, stat as stat64, 110 lstat as lstat64, off64_t, open as open64, stat as stat64,
112 }; 111 };
@@ -120,7 +119,7 @@ index aea0c26ee8b..e7be4729ca6 100644
120 target_os = "linux", 119 target_os = "linux",
121 target_os = "emscripten", 120 target_os = "emscripten",
122 target_os = "l4re", 121 target_os = "l4re",
123@@ -87,7 +98,7 @@ 122@@ -90,7 +101,7 @@ use libc::{
124 dirent as dirent64, fstat as fstat64, ftruncate as ftruncate64, lseek as lseek64, 123 dirent as dirent64, fstat as fstat64, ftruncate as ftruncate64, lseek as lseek64,
125 lstat as lstat64, off_t as off64_t, open as open64, stat as stat64, 124 lstat as lstat64, off_t as off64_t, open as open64, stat as stat64,
126 }; 125 };
@@ -129,7 +128,7 @@ index aea0c26ee8b..e7be4729ca6 100644
129 use libc::{dirent64, fstat64, ftruncate64, lseek64, lstat64, off64_t, open64, stat64}; 128 use libc::{dirent64, fstat64, ftruncate64, lseek64, lstat64, off64_t, open64, stat64};
130 129
131 pub use crate::sys_common::fs::try_exists; 130 pub use crate::sys_common::fs::try_exists;
132@@ -260,6 +271,7 @@ unsafe impl Sync for Dir {} 131@@ -277,6 +288,7 @@ unsafe impl Sync for Dir {}
133 #[cfg(any( 132 #[cfg(any(
134 target_os = "android", 133 target_os = "android",
135 target_os = "linux", 134 target_os = "linux",
@@ -137,7 +136,7 @@ index aea0c26ee8b..e7be4729ca6 100644
137 target_os = "solaris", 136 target_os = "solaris",
138 target_os = "illumos", 137 target_os = "illumos",
139 target_os = "fuchsia", 138 target_os = "fuchsia",
140@@ -292,6 +304,7 @@ struct dirent64_min { 139@@ -311,6 +323,7 @@ struct dirent64_min {
141 } 140 }
142 141
143 #[cfg(not(any( 142 #[cfg(not(any(
@@ -145,7 +144,7 @@ index aea0c26ee8b..e7be4729ca6 100644
145 target_os = "android", 144 target_os = "android",
146 target_os = "linux", 145 target_os = "linux",
147 target_os = "solaris", 146 target_os = "solaris",
148@@ -745,7 +758,7 @@ pub fn file_name(&self) -> OsString { 147@@ -786,7 +799,7 @@ impl DirEntry {
149 } 148 }
150 149
151 #[cfg(all( 150 #[cfg(all(
@@ -154,7 +153,7 @@ index aea0c26ee8b..e7be4729ca6 100644
154 not(miri) 153 not(miri)
155 ))] 154 ))]
156 pub fn metadata(&self) -> io::Result<FileAttr> { 155 pub fn metadata(&self) -> io::Result<FileAttr> {
157@@ -769,7 +782,7 @@ pub fn metadata(&self) -> io::Result<FileAttr> { 156@@ -810,7 +823,7 @@ impl DirEntry {
158 } 157 }
159 158
160 #[cfg(any( 159 #[cfg(any(
@@ -163,6 +162,3 @@ index aea0c26ee8b..e7be4729ca6 100644
163 miri 162 miri
164 ))] 163 ))]
165 pub fn metadata(&self) -> io::Result<FileAttr> { 164 pub fn metadata(&self) -> io::Result<FileAttr> {
166--
1672.39.0
168