Skip to content

Commit

Permalink
Fix build for mips architecture
Browse files Browse the repository at this point in the history
Rdev is uint32 on mips so we have to typecast to uint64 in that case.
see: https://github.com/golang/go/blob/c9fb4eb0a22131cc9922fa96afba01d4e21d4fd4/src/syscall/ztypes_linux_mips.go#L104

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Paul Holzinger committed Dec 22, 2020
1 parent c97374b commit 9da8e3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/dev/tty.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ func TTYs() (*[]TTY, error) {
}
s := fi.Sys().(*syscall.Stat_t)
t := TTY{
Minor: minDevNum(s.Rdev),
Major: majDevNum(s.Rdev),
// Rdev is type uint32 on mips arch so we have to cast to uint64
Minor: minDevNum(uint64(s.Rdev)),
Major: majDevNum(uint64(s.Rdev)),
Path: dev,
}
ttys = append(ttys, t)
Expand Down

0 comments on commit 9da8e3e

Please sign in to comment.