Message ID | BANLkTikBR_LuPufmMvFxCVubqzAAA=RKaw@mail.gmail.com |
---|---|
State | New |
Headers | show |
Uros Bizjak <ubizjak@gmail.com> writes: > This still doesn't fix the build for alpha due to extra struct. From > sysinfo.go: > > type Timespec struct { Sec Timespec_sec_t; Nsec Timespec_nsec_t; } > type Stat_t struct { Dev uint64; Ino uint64; Rdev uint64; Size int64; > Blocks uint64; Mode uint32; Uid uint32; Gid uint32; Blksize uint32; > Nlink uint32; __pad0 int32; Go0 struct { Atime Timespec; }; Go1 struct > { Mtime Timespec; }; Go2 struct { Ctime Timespec; }; __unused > [2+1]int64; } > Is there a solution for this problem? I haven't fixed it yet but I think the way to fix it is to edit mksysinfo.sh to strip out the unexpected structs. Ian
Index: go/os/stat.go =================================================================== --- go/os/stat.go (revision 173234) +++ go/os/stat.go (working copy) @@ -23,9 +23,9 @@ fi.Size = int64(stat.Size) fi.Blksize = int64(stat.Blksize) fi.Blocks = int64(stat.Blocks) - fi.Atime_ns = int64(stat.Atime.Sec)*1e9 + int64(stat.Atime.Nsec) - fi.Mtime_ns = int64(stat.Mtime.Sec)*1e9 + int64(stat.Mtime.Nsec) - fi.Ctime_ns = int64(stat.Ctime.Sec)*1e9 + int64(stat.Atime.Nsec) + fi.Atime_ns = int64(stat.Go0.Atime.Sec)*1e9 + int64(stat.Go0.Atime.Nsec) + fi.Mtime_ns = int64(stat.Go1.Mtime.Sec)*1e9 + int64(stat.Go1.Mtime.Nsec) + fi.Ctime_ns = int64(stat.Go2.Ctime.Sec)*1e9 + int64(stat.Go2.Ctime.Nsec) for i := len(name)-1; i >= 0; i-- { if name[i] == '/' { name = name[i+1:]