]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
chrt: add missing #ifdef SCHED_FLAG_RESET_ON_FORK guard
authorKarel Zak <kzak@redhat.com>
Wed, 13 May 2026 08:32:57 +0000 (10:32 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 13 May 2026 08:32:57 +0000 (10:32 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
schedutils/chrt.c

index c1895d1177fc39f9b9bd0285c7e8ed0caaeb8f66..6bf08c5c1a5c4cd70e5f7e0da3d741ef22aca6ea 100644 (file)
@@ -221,7 +221,9 @@ static void show_sched_pid_info(struct chrt_ctl *ctl, pid_t pid)
 
                policy = sa.sched_policy;
                prio = sa.sched_priority;
+# ifdef SCHED_FLAG_RESET_ON_FORK
                reset_on_fork = sa.sched_flags & SCHED_FLAG_RESET_ON_FORK;
+# endif
                runtime = sa.sched_runtime;
 #ifdef SCHED_DEADLINE
                deadline = sa.sched_deadline;