]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Linux: Match kernel text for SCHED_ macros
authorFlorian Weimer <fweimer@redhat.com>
Fri, 25 Oct 2024 13:00:50 +0000 (15:00 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 25 Oct 2024 14:46:30 +0000 (16:46 +0200)
This avoids -Werror build issues in strace, which bundles UAPI
headers, but does not include them as system headers.

Fixes commit c444cc1d8335243c5c4e636d6a26c472df85522c
("Linux: Add missing scheduler constants to <sched.h>").

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
sysdeps/unix/sysv/linux/bits/sched.h

index a02cb69de77794faf271189a603cd653e219b0d0..f03f5f5ab3aa2404c862832b1fd758ad7c4051cf 100644 (file)
@@ -29,7 +29,7 @@
 #define SCHED_FIFO             1
 #define SCHED_RR               2
 #ifdef __USE_GNU
-# define SCHED_NORMAL          SCHED_OTHER
+# define SCHED_NORMAL          0
 # define SCHED_BATCH           3
 # define SCHED_ISO             4
 # define SCHED_IDLE            5
 #define SCHED_FLAG_UTIL_CLAMP_MAX      0x40
 
 /* Combinations of sched_flags fields.  */
-#define SCHED_FLAG_KEEP_ALL            0x18
-#define SCHED_FLAG_UTIL_CLAMP          0x60
+#define SCHED_FLAG_KEEP_ALL \
+  (SCHED_FLAG_KEEP_POLICY | SCHED_FLAG_KEEP_PARAMS)
+#define SCHED_FLAG_UTIL_CLAMP \
+  (SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX)
 
 /* Use "" to work around incorrect macro expansion of the
    __has_include argument (GCC PR 80005).  */