Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1474 from MansM/master
Browse files Browse the repository at this point in the history
making compiling work on raspberry pi's
  • Loading branch information
squaremo authored Nov 1, 2018
2 parents bfa8405 + 3766a1a commit def3d3a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
File renamed without changes.
23 changes: 23 additions & 0 deletions checkpoint/checkpoint_linux_arm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package checkpoint

import (
"syscall"
)

func getKernelVersion() string {
var uts syscall.Utsname
syscall.Uname(&uts)
return cstringToString(uts.Release[:])
}

func cstringToString(c []uint8) string {
s := make([]byte, len(c))
i := 0
for ; i < len(c); i++ {
if c[i] == 0 {
break
}
s[i] = uint8(c[i])
}
return string(s[:i])
}

0 comments on commit def3d3a

Please sign in to comment.