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