From e3cafeaf9292f67459ff1d186f68283bfaedf2ae Mon Sep 17 00:00:00 2001 From: Wim Date: Mon, 31 Jan 2022 00:27:37 +0100 Subject: Add dependencies/vendor (whatsapp) --- vendor/modernc.org/sqlite/rlimit_freebsd.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 vendor/modernc.org/sqlite/rlimit_freebsd.go (limited to 'vendor/modernc.org/sqlite/rlimit_freebsd.go') diff --git a/vendor/modernc.org/sqlite/rlimit_freebsd.go b/vendor/modernc.org/sqlite/rlimit_freebsd.go new file mode 100644 index 00000000..c3d4ddbc --- /dev/null +++ b/vendor/modernc.org/sqlite/rlimit_freebsd.go @@ -0,0 +1,16 @@ +// Copyright 2021 The Sqlite Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sqlite // import "modernc.org/sqlite" + +import ( + "golang.org/x/sys/unix" +) + +func setMaxOpenFiles(n int64) error { + var rLimit unix.Rlimit + rLimit.Max = n + rLimit.Cur = n + return unix.Setrlimit(unix.RLIMIT_NOFILE, &rLimit) +} -- cgit v1.2.3