Skip to content

Commit 628a0bd

Browse files
enriquefynnkaralabe
authored andcommitted
common/fdlimit: Fix compilation error in freebsd, Raise() returns uint64 (#19141)
cast limit.Cur (int64) to uint64, fix test and compilation error
1 parent fbedf62 commit 628a0bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/fdlimit/fdlimit_freebsd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func Raise(max uint64) (uint64, error) {
4343
if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &limit); err != nil {
4444
return 0, err
4545
}
46-
return limit.Cur, nil
46+
return uint64(limit.Cur), nil
4747
}
4848

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

0 commit comments

Comments
 (0)