1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 19:24:14 +08:00

Merge pull request #1202 from ipfs/godeps/metrics

godeps: update metrics (freebsd build fix)
This commit is contained in:
Juan Batiz-Benet
2015-05-08 01:29:05 -04:00
2 changed files with 4 additions and 2 deletions

2
Godeps/Godeps.json generated
View File

@ -63,7 +63,7 @@
},
{
"ImportPath": "github.com/codahale/metrics",
"Rev": "7d3beb1b480077e77c08a6f6c65ea969f6e91420"
"Rev": "7c37910bc765e705301b159683480bdd44555c91"
},
{
"ImportPath": "github.com/coreos/go-semver/semver",

View File

@ -14,7 +14,9 @@ func getFDLimit() (uint64, error) {
if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlimit); err != nil {
return 0, err
}
return rlimit.Cur, nil
// rlimit.Cur's type is platform-dependent, so here we widen it as far as Go
// will allow by converting it to a uint64.
return uint64(rlimit.Cur), nil
}
func getFDUsage() (uint64, error) {