ipld-eth-server/vendor/github.com/libp2p/go-libp2p-kad-dht/nofile_test_posix.go
Elizabeth Engelman 36533f7c3f Update vendor directory and make necessary code changes
Fixes for new geth version
2019-09-25 16:32:27 -05:00

13 lines
236 B
Go

// +build !windows,!wasm
package dht
import "syscall"
func curFileLimit() uint64 {
var n syscall.Rlimit
syscall.Getrlimit(syscall.RLIMIT_NOFILE, &n)
// cast because some platforms use int64 (e.g., freebsd)
return uint64(n.Cur)
}