]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
missing_resource.h: RLIMIT_RTTIME is defined since glibc-2.14
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Feb 2025 19:14:28 +0000 (04:14 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 3 Mar 2025 17:24:49 +0000 (02:24 +0900)
Now our baseline is glibc-2.31.

src/basic/missing_resource.h [deleted file]
src/basic/rlimit-util.c
src/basic/rlimit-util.h
src/core/execute.h
src/libsystemd/sd-bus/test-bus-benchmark.c
src/nspawn/nspawn-settings.h
src/shared/user-record.h
src/test/test-rlimit-util.c

diff --git a/src/basic/missing_resource.h b/src/basic/missing_resource.h
deleted file mode 100644 (file)
index 1807673..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#pragma once
-
-#include <sys/resource.h>
-
-#include "macro.h"
-
-#ifndef RLIMIT_RTTIME
-#  define RLIMIT_RTTIME 15
-#else
-assert_cc(RLIMIT_RTTIME == 15);
-#endif
-
-/* If RLIMIT_RTTIME is not defined, then we cannot use RLIMIT_NLIMITS as is */
-#define _RLIMIT_MAX (RLIMIT_RTTIME+1 > RLIMIT_NLIMITS ? RLIMIT_RTTIME+1 : RLIMIT_NLIMITS)
index a9f7b87f2899617318d816d95a1c920e45b0efac..70c25adf460f395f6ddd4d23c4355134df8bbb9c 100644 (file)
@@ -9,7 +9,6 @@
 #include "fileio.h"
 #include "format-util.h"
 #include "macro.h"
-#include "missing_resource.h"
 #include "process-util.h"
 #include "rlimit-util.h"
 #include "string-table.h"
index b5f99894871cdf31a7d99890d5a6192093fd2f3f..ad48e315501d09ab6f6bc9564305cafde7467310 100644 (file)
@@ -4,7 +4,8 @@
 #include <sys/resource.h>
 
 #include "macro.h"
-#include "missing_resource.h"
+
+#define _RLIMIT_MAX RLIMIT_NLIMITS
 
 const char* rlimit_to_string(int i) _const_;
 int rlimit_from_string(const char *s) _pure_;
index 17662e5c157738cb94b9fd64dc24662bc1471a51..65a9b0dea13851a48f80d506fe532b65f6251ac0 100644 (file)
@@ -22,13 +22,13 @@ typedef struct Manager Manager;
 #include "exec-util.h"
 #include "fdset.h"
 #include "list.h"
-#include "missing_resource.h"
 #include "namespace.h"
 #include "nsflags.h"
 #include "numa-util.h"
 #include "open-file.h"
 #include "ordered-set.h"
 #include "path-util.h"
+#include "rlimit-util.h"
 #include "runtime-scope.h"
 #include "set.h"
 #include "time-util.h"
index d988588de049a8395fc8e16b9128e3cbb1470786..78ae564aeb108ac8f31b948891486fa25fcf4f42 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <sys/resource.h>
 #include <sys/wait.h>
 #include <unistd.h>
 
@@ -10,7 +11,6 @@
 #include "bus-kernel.h"
 #include "constants.h"
 #include "fd-util.h"
-#include "missing_resource.h"
 #include "string-util.h"
 #include "tests.h"
 #include "time-util.h"
index 0b3050639160f7ae70cc8bb2a9c50e59a08a6d23..e057fc123d808d89ce76e0443594da1a96ec4938 100644 (file)
@@ -11,9 +11,9 @@
 #include "conf-parser.h"
 #include "cpu-set-util.h"
 #include "macro.h"
-#include "missing_resource.h"
 #include "nspawn-expose-ports.h"
 #include "nspawn-mount.h"
+#include "rlimit-util.h"
 #include "seccomp-util.h"
 #include "time-util.h"
 
index 8f58c5ca93d84bbc8315d595a93b78f798d3dca3..67ae68634a6d5e70704cc9ea9fc7a635e047101c 100644 (file)
@@ -8,7 +8,7 @@
 #include "sd-json.h"
 
 #include "hashmap.h"
-#include "missing_resource.h"
+#include "rlimit-util.h"
 #include "strv.h"
 #include "time-util.h"
 #include "user-util.h"
index fc9e89c46670112cff4655cffd95446e1c3f43c7..55f512cf009b85a1a4d7b3a0187d1747101b6b28 100644 (file)
@@ -8,7 +8,6 @@
 #include "alloc-util.h"
 #include "capability-util.h"
 #include "macro.h"
-#include "missing_resource.h"
 #include "process-util.h"
 #include "rlimit-util.h"
 #include "string-util.h"