Ports: Update patch's patches to use git patches

This commit is contained in:
Ali Mohammad Pur 2022-05-16 23:08:17 +04:30 committed by Ali Mohammad Pur
parent 848c883bb6
commit 5b91e02dc9
Notes: sideshowbarker 2024-07-17 10:47:53 +09:00
3 changed files with 34 additions and 14 deletions

View file

@ -0,0 +1,27 @@
From 101002ce462efc69f8511bcb056eba1ca1d89d90 Mon Sep 17 00:00:00 2001
From: Tim Schumacher <timschumi@gmx.de>
Date: Wed, 10 Nov 2021 02:07:36 +0100
Subject: [PATCH] Remove oversized dirfd cache
---
src/safe.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/safe.c b/src/safe.c
index 5a7202f..562a791 100644
--- a/src/safe.c
+++ b/src/safe.c
@@ -98,9 +98,7 @@ static void init_dirfd_cache (void)
{
struct rlimit nofile;
- max_cached_fds = 8;
- if (getrlimit (RLIMIT_NOFILE, &nofile) == 0)
- max_cached_fds = MAX (nofile.rlim_cur / 4, max_cached_fds);
+ max_cached_fds = 64;
cached_dirfds = hash_initialize (max_cached_fds,
NULL,
--
2.36.1

View file

@ -0,0 +1,7 @@
# Patches for patch on SerenityOS
## `0001-Remove-oversized-dirfd-cache.patch`
Remove oversized dirfd cache

View file

@ -1,14 +0,0 @@
diff -ur a/src/safe.c b/src/safe.c
--- a/src/safe.c 2018-02-03 13:41:49.000000000 +0100
+++ b/src/safe.c 2021-11-10 02:05:04.152449983 +0100
@@ -98,9 +98,7 @@
{
struct rlimit nofile;
- max_cached_fds = 8;
- if (getrlimit (RLIMIT_NOFILE, &nofile) == 0)
- max_cached_fds = MAX (nofile.rlim_cur / 4, max_cached_fds);
+ max_cached_fds = 64;
cached_dirfds = hash_initialize (max_cached_fds,
NULL,