Skip to content

Commit

Permalink
common/fdlimit: Fix compilation error in freebsd, Raise() returns uin…
Browse files Browse the repository at this point in the history
…t64 (ethereum#19141)

cast limit.Cur (int64) to uint64, fix test and compilation error
  • Loading branch information
enriquefynn authored and kiku-jw committed Mar 29, 2019
1 parent 42b6188 commit c723528
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/fdlimit/fdlimit_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func Raise(max uint64) (uint64, error) {
if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &limit); err != nil {
return 0, err
}
return limit.Cur, nil
return uint64(limit.Cur), nil
}

// Current retrieves the number of file descriptors allowed to be opened by this
Expand Down

0 comments on commit c723528

Please sign in to comment.