@@ -155,6 +155,74 @@ mod arch {
155
155
}
156
156
}
157
157
158
+ #[ cfg( target_arch = "riscv64" ) ]
159
+ mod arch {
160
+ use crate :: os:: raw:: { c_uchar, c_ulong} ;
161
+ use crate :: os:: unix:: raw:: { gid_t, uid_t} ;
162
+
163
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
164
+ pub type dev_t = u64 ;
165
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
166
+ pub type mode_t = u32 ;
167
+
168
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
169
+ pub type blkcnt_t = u64 ;
170
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
171
+ pub type blksize_t = u64 ;
172
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
173
+ pub type ino_t = u64 ;
174
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
175
+ pub type nlink_t = u64 ;
176
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
177
+ pub type off_t = u64 ;
178
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
179
+ pub type time_t = i64 ;
180
+
181
+ #[ repr( C ) ]
182
+ #[ derive( Clone ) ]
183
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
184
+ pub struct stat {
185
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
186
+ pub st_dev : dev_t ,
187
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
188
+ pub __pad0 : [ c_uchar ; 4 ] ,
189
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
190
+ pub __st_ino : ino_t ,
191
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
192
+ pub st_mode : mode_t ,
193
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
194
+ pub st_nlink : nlink_t ,
195
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
196
+ pub st_uid : uid_t ,
197
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
198
+ pub st_gid : gid_t ,
199
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
200
+ pub st_rdev : dev_t ,
201
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
202
+ pub __pad3 : [ c_uchar ; 4 ] ,
203
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
204
+ pub st_size : off_t ,
205
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
206
+ pub st_blksize : blksize_t ,
207
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
208
+ pub st_blocks : blkcnt_t ,
209
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
210
+ pub st_atime : time_t ,
211
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
212
+ pub st_atime_nsec : c_ulong ,
213
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
214
+ pub st_mtime : time_t ,
215
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
216
+ pub st_mtime_nsec : c_ulong ,
217
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
218
+ pub st_ctime : time_t ,
219
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
220
+ pub st_ctime_nsec : c_ulong ,
221
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
222
+ pub st_ino : ino_t ,
223
+ }
224
+ }
225
+
158
226
#[ cfg( target_arch = "x86_64" ) ]
159
227
mod arch {
160
228
use crate :: os:: raw:: { c_long, c_uint, c_ulong} ;
0 commit comments