1+ const builtin = @import ("builtin" );
12const std = @import ("../../std.zig" );
2- const maxInt = std .math .maxInt ;
3- const linux = std .os .linux ;
4- const SYS = linux .SYS ;
5- const iovec = std .posix .iovec ;
6- const iovec_const = std .posix .iovec_const ;
7- const socklen_t = linux .socklen_t ;
8- const stack_t = linux .stack_t ;
9- const sigset_t = linux .sigset_t ;
10- const uid_t = linux .uid_t ;
11- const gid_t = linux .gid_t ;
12- const pid_t = linux .pid_t ;
13- const sockaddr = linux .sockaddr ;
14- const timespec = linux .timespec ;
3+ const SYS = std .os .linux .SYS ;
154
165pub fn syscall0 (number : SYS ) u32 {
176 return asm volatile ("svc #0"
@@ -128,7 +117,7 @@ pub fn clone() callconv(.naked) u32 {
128117}
129118
130119pub fn restore () callconv (.naked ) noreturn {
131- switch (@import ( " builtin" ) .zig_backend ) {
120+ switch (builtin .zig_backend ) {
132121 .stage2_c = > asm volatile (
133122 \\ mov r7, %[number]
134123 \\ svc #0
@@ -144,7 +133,7 @@ pub fn restore() callconv(.naked) noreturn {
144133}
145134
146135pub fn restore_rt () callconv (.naked ) noreturn {
147- switch (@import ( " builtin" ) .zig_backend ) {
136+ switch (builtin .zig_backend ) {
148137 .stage2_c = > asm volatile (
149138 \\ mov r7, %[number]
150139 \\ svc #0
@@ -206,27 +195,27 @@ pub const Stat = extern struct {
206195 __ino_truncated : u32 ,
207196 mode : mode_t ,
208197 nlink : nlink_t ,
209- uid : uid_t ,
210- gid : gid_t ,
198+ uid : std.os.linux. uid_t ,
199+ gid : std.os.linux. gid_t ,
211200 rdev : dev_t ,
212201 __rdev_padding : u32 ,
213202 size : off_t ,
214203 blksize : blksize_t ,
215204 blocks : blkcnt_t ,
216- atim : timespec ,
217- mtim : timespec ,
218- ctim : timespec ,
205+ atim : std.os.linux. timespec ,
206+ mtim : std.os.linux. timespec ,
207+ ctim : std.os.linux. timespec ,
219208 ino : ino_t ,
220209
221- pub fn atime (self : @This ()) timespec {
210+ pub fn atime (self : @This ()) std.os.linux. timespec {
222211 return self .atim ;
223212 }
224213
225- pub fn mtime (self : @This ()) timespec {
214+ pub fn mtime (self : @This ()) std.os.linux. timespec {
226215 return self .mtim ;
227216 }
228217
229- pub fn ctime (self : @This ()) timespec {
218+ pub fn ctime (self : @This ()) std.os.linux. timespec {
230219 return self .ctim ;
231220 }
232221};
0 commit comments