common/fdlimit: Fix compilation error in freebsd, Raise returns uint64 (#19141)

This commit is contained in:
Daniel Liu 2024-07-10 09:41:42 +08:00 committed by Daniel Liu
parent be2d40bcdd
commit c012af02d3

View file

@ -44,7 +44,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