From 628a0bde3f6667a00cd857c4f5143cb31f038615 Mon Sep 17 00:00:00 2001 From: Enrique Fynn Date: Thu, 21 Feb 2019 10:16:51 +0100 Subject: [PATCH] common/fdlimit: Fix compilation error in freebsd, Raise() returns uint64 (#19141) cast limit.Cur (int64) to uint64, fix test and compilation error --- common/fdlimit/fdlimit_freebsd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/fdlimit/fdlimit_freebsd.go b/common/fdlimit/fdlimit_freebsd.go index 5da4342379..0d8727138e 100644 --- a/common/fdlimit/fdlimit_freebsd.go +++ b/common/fdlimit/fdlimit_freebsd.go @@ -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