Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
From 3a0181ab0fb6c40f613894e65009e148c6e652c9 Mon Sep 17 00:00:00 2001
|
|
From: Alyssa Ross <hi@alyssa.is>
|
|
Date: Mon, 16 Sep 2024 10:24:08 +0200
|
|
Subject: [PATCH] Remove outdated musl hack in rlimit_nofile_safe
|
|
|
|
This was incorrect, because RLIM_FMT is not the format specifier for uintmax_t.
|
|
|
|
Since 53e84063a ("Change RLIM_FMT to '%llu' for non-glibc builds (#269)"),
|
|
RLIM_FMT is correct for musl, so there's no longer any need for this casting
|
|
version.
|
|
|
|
Link: https://github.com/elogind/elogind/pull/288
|
|
---
|
|
src/basic/rlimit-util.c | 4 ----
|
|
1 file changed, 4 deletions(-)
|
|
|
|
diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
|
|
index 091c111df..59bdc35a0 100644
|
|
--- a/src/basic/rlimit-util.c
|
|
+++ b/src/basic/rlimit-util.c
|
|
@@ -428,11 +428,7 @@ int rlimit_nofile_safe(void) {
|
|
rl.rlim_max = MIN(rl.rlim_max, (rlim_t) read_nr_open());
|
|
rl.rlim_cur = MIN((rlim_t) FD_SETSIZE, rl.rlim_max);
|
|
if (setrlimit(RLIMIT_NOFILE, &rl) < 0)
|
|
-#ifdef __GLIBC__ /// To be compatible with musl-libc, elogind uses an (uintmax_t) cast.
|
|
return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", rl.rlim_cur);
|
|
-#else // __GLIBC__
|
|
- return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", (uintmax_t)rl.rlim_cur);
|
|
-#endif // __GLIBC__
|
|
|
|
return 1;
|
|
}
|
|
--
|
|
2.45.2
|
|
|