authorgravatar for greg@unrelenting.technologyGreg V <greg@unrelenting.technology> 2018-12-20 23:54:09+03:00
committergravatar for greg@unrelenting.technologyGreg V <greg@unrelenting.technology> 2018-12-20 23:54:09+03:00
log054c7ab18a8c9527414164bf68aa3564c29e8931
tree4479d3ad743bdf961ee0b09b2cde02b8ab196bd1
parente5b4748101ca40f5dc4082ce2cb46df0c8607417

Fix stat/timespec definitions for FreeBSD


1 files changed, 11 insertions(+), 6 deletions(-)

std/c/freebsd.zig+11-6
...@@ -50,18 +50,23 @@ pub const Stat = extern struct {...@@ -50,18 +50,23 @@ pub const Stat = extern struct {
50 nlink: usize,50 nlink: usize,
5151
52 mode: u32,52 mode: u32,
53 __pad0: u16,
53 uid: u32,54 uid: u32,
54 gid: u32,55 gid: u32,
55 __pad0: u32,56 __pad1: u32,
56 rdev: u64,57 rdev: u64,
57 size: i64,
58 blksize: isize,
59 blocks: i64,
6058
61 atim: timespec,59 atim: timespec,
62 mtim: timespec,60 mtim: timespec,
63 ctim: timespec,61 ctim: timespec,
64 __unused: [3]isize,62 birthtim: timespec,
63
64 size: i64,
65 blocks: i64,
66 blksize: isize,
67 flags: u32,
68 gen: u64,
69 __spare: [10]u64,
65};70};
6671
67pub const timespec = extern struct {72pub const timespec = extern struct {
...@@ -72,7 +77,7 @@ pub const timespec = extern struct {...@@ -72,7 +77,7 @@ pub const timespec = extern struct {
72pub const dirent = extern struct {77pub const dirent = extern struct {
73 d_fileno: usize,78 d_fileno: usize,
74 d_off: i64,79 d_off: i64,
75 d_reclen: u64,80 d_reclen: u16,
76 d_type: u8,81 d_type: u8,
77 d_pad0: u8,82 d_pad0: u8,
78 d_namlen: u16,83 d_namlen: u16,