summaryrefslogtreecommitdiffstats
path: root/src/basic/missing_syscall.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:18:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:18:34 +0000
commit67497cedb2f732b3445ecdc0d09b881f9c69f852 (patch)
treeb7197679acca419c7ddc0300873e19141d5fae3e /src/basic/missing_syscall.h
parentAdding debian version 256.1-2. (diff)
downloadsystemd-67497cedb2f732b3445ecdc0d09b881f9c69f852.tar.xz
systemd-67497cedb2f732b3445ecdc0d09b881f9c69f852.zip
Merging upstream version 256.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/basic/missing_syscall.h')
-rw-r--r--src/basic/missing_syscall.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
index 8628077..e2cd8b4 100644
--- a/src/basic/missing_syscall.h
+++ b/src/basic/missing_syscall.h
@@ -22,6 +22,7 @@
#include "macro.h"
#include "missing_keyctl.h"
+#include "missing_sched.h"
#include "missing_stat.h"
#include "missing_syscall_def.h"
@@ -667,6 +668,22 @@ static inline ssize_t missing_getdents64(int fd, void *buffer, size_t length) {
/* ======================================================================= */
+#if !HAVE_SCHED_SETATTR
+
+static inline ssize_t missing_sched_setattr(pid_t pid, struct sched_attr *attr, unsigned int flags) {
+# if defined __NR_sched_setattr
+ return syscall(__NR_sched_setattr, pid, attr, flags);
+# else
+ errno = ENOSYS;
+ return -1;
+# endif
+}
+
+# define sched_setattr missing_sched_setattr
+#endif
+
+/* ======================================================================= */
+
/* glibc does not provide clone() on ia64, only clone2(). Not only that, but it also doesn't provide a
* prototype, only the symbol in the shared library (it provides a prototype for clone(), but not the
* symbol in the shared library). */