From a5ba6b98c1d69071b09b8d31e67ea53286fd4414 Mon Sep 17 00:00:00 2001 From: Steven Chamberlain Date: Mon, 11 Jun 2012 22:11:23 +1000 Subject: [PATCH] Description: fix to build on non-Linux arches Fix the build where it seems a code fix for Linux was likely untested on other systems. Define SCHED_BATCH in test-schedbatch, for systems that don't have it; the corresponding RH BZ#741090 patch used the magic value 3 in output.c anyway. Bug-Debian: http://bugs.debian.org/677055 --- NEWS | 2 ++ proc/version.c | 1 + testsuite/ps.test/test-schedbatch.c | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 29512ee4..bdaa3f14 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ procps-ng-3.3.4 --------------- * Removed ps -aux bogus message * w get -i option to display IP addresses + * watch 8bit fixes Debian #675069 + * Fixed FTBFS for non-linux Debian #677055 procps-ng-3.3.3 --------------- diff --git a/proc/version.c b/proc/version.c index e0dca3c7..12bd46a4 100644 --- a/proc/version.c +++ b/proc/version.c @@ -75,6 +75,7 @@ void init_Linux_version(void) { "release %s=%d.%d.%d gives version code %d\n", uts.release, x, y, z, LINUX_VERSION(x,y,z)); #else + fprintf(stderr, /* *very* unlikely to happen by accident */ "%s=%d.%d.%d gives version code %d\n", buf, x, y, z, LINUX_VERSION(x,y,z)); #endif /* __linux__ */ diff --git a/testsuite/ps.test/test-schedbatch.c b/testsuite/ps.test/test-schedbatch.c index 13cd6f33..20cf2966 100644 --- a/testsuite/ps.test/test-schedbatch.c +++ b/testsuite/ps.test/test-schedbatch.c @@ -15,6 +15,11 @@ #include #include +/* Defined in Linux headers only */ +#ifndef SCHED_BATCH +#define SCHED_BATCH 3 +#endif + int main(int argc, const char *argv[]) { int nice = 19;