]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: gate schedutils behind its requirements
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 29 Apr 2026 12:16:48 +0000 (14:16 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Tue, 12 May 2026 12:01:17 +0000 (14:01 +0200)
The targets need various headers, symbols and types.
Encode this in the build system.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
meson.build

index 0b2cffa397094a100d930d7203717e6ffb692644..09e68c24ab7e5e663abc9b2b35cbcaeb0c001226 100644 (file)
@@ -623,6 +623,7 @@ funcs = '''
         __fpurge
         fpurge
         __fpending
+        sched_getscheduler
         secure_getenv
         __secure_getenv
         eaccess
@@ -3477,7 +3478,11 @@ endif
 
 ############################################################
 
-opt = get_option('build-schedutils').allowed()
+opt = get_option('build-schedutils') \
+      .require(conf.get('HAVE_SCHED_GETSCHEDULER').to_string() == '1') \
+      .require(conf.get('HAVE_SYS_PRCTL_H').to_string() == '1') \
+      .require(conf.get('HAVE_CPU_SET_T').to_string() == '1') \
+      .allowed()
 exe = executable(
   'chrt',
   'schedutils/chrt.c',