void-packages/srcpkgs/musl/patches/add-rlimit-rttime.patch
oreo639 829d9d4983 musl: remove compat basename declaration and add RLIMIT_RTTIME define
This declaration was added to musl to avoid warnings for applications that
expect GNU basename() in string.h.

Pre-ansi style declarations were used to avoid causing errors due to
incompatibile declarations of basename().

In C23, just like in C++, function declarations with no arguments are treated
as having no arguments, instead of having unspecified arguments. As such,
this creates a conflicting declaration in C23.
2024-01-27 17:17:55 -08:00

24 lines
805 B
Diff

From 2507e7f5312e79620f6337935d0a6c9045ccba09 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 11 Jan 2020 20:16:59 +0100
Subject: [PATCH] define RLIMIT_RTTIME, bump RLIMIT_NLIMITS
This macro exists since Linux 2.6.25 and is defined in glibc since 2011.
---
include/sys/resource.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/sys/resource.h b/include/sys/resource.h
index e0c86ae33..3068328d0 100644
--- a/include/sys/resource.h
+++ b/include/sys/resource.h
@@ -90,7 +90,8 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
#define RLIMIT_MSGQUEUE 12
#define RLIMIT_NICE 13
#define RLIMIT_RTPRIO 14
-#define RLIMIT_NLIMITS 15
+#define RLIMIT_RTTIME 15
+#define RLIMIT_NLIMITS 16
#define RLIM_NLIMITS RLIMIT_NLIMITS