Re: util-linux: chrt no longer being built on non-linux Debian archs
Hello again Ruediger.
Please see the attached patch which seems to work when I build-tested
it on kfreebsd. If you think it does the right thing please sign off
on it and forward it upstream!
Regards,
Andreas Henriksson
>From 552a84db9bce21bfde55ba372b4b3e2e9f6b7170 Mon Sep 17 00:00:00 2001
From: Andreas Henriksson <andreas@fatal.se>
Date: Sun, 8 May 2016 09:21:21 +0200
Subject: [PATCH] build: allow building chrt on non-linux (missing
sched_setattr)
Since util-linux 2.28 the chrt is no longer built on Debian
kFreeBSD and hurd architectures, because sched_setattr is not found
as checked in configure.ac since commit ee20c303ac4336b56
"build-sys: chrt requires a sched_set* function"
The sched_setattr function not being available seems to already be
handled by the schedutils/chrt.c code (and HAVE_SCHED_SETATTR is
checked/defined in configure.ac as well), thus that function
should not be required to build chrt - only sched_setscheduler.
This patch has been build-tested on Debian GNU/kFreeBSD.
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
---
configure.ac | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index b48a24a..28fbd9a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1833,13 +1833,11 @@ UL_REQUIRES_SYSCALL_CHECK([taskset],
AM_CONDITIONAL([BUILD_TASKSET], [test "x$build_taskset" = xyes])
-have_schedsetter=no
-AS_IF([test "x$ac_cv_func_sched_setscheduler" = xyes], [have_schedsetter=yes],
- [test "x$ac_cv_func_sched_setattr" = xyes], [have_schedsetter=yes])
-
UL_BUILD_INIT([chrt], [check])
UL_REQUIRES_BUILD([chrt], [schedutils])
-UL_REQUIRES_HAVE([chrt], [schedsetter], [sched_set functions])
+UL_REQUIRES_SYSCALL_CHECK([chrt],
+ [UL_CHECK_SYSCALL([sched_setscheduler])],
+ [sched_setscheduler])
AM_CONDITIONAL([BUILD_CHRT], [test "x$build_chrt" = xyes])
AS_IF([test "x$build_chrt" = xyes], [
--
2.8.1
Reply to: