Bug#677055: procps: FTBFS[!linux]: two regressions breaking build
Package: src:procps
Version: 3.3.3-1
Severity: serious
Tags: sid wheezy patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd
X-Debbugs-Cc: debian-bsd@lists.debian.org
Justification: fails to build from source (but built successfully in the
past)
Hi,
Please see the attached patch, fixing code in two places that would not
compile on systems other than Linux.
The result builds and appears okay when quickly tested kfreebsd-i386.
Thanks,
Regards,
--
Steven Chamberlain
steven@pyro.eu.org
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.
Author: Steven Chamberlain <steven@pyro.eu.org>
--- procps-3.3.3.orig/proc/version.c 2012-03-15 20:17:43.000000000 +0000
+++ procps-3.3.3/proc/version.c 2012-06-11 11:46:59.805848717 +0100
@@ -75,6 +75,7 @@
"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__ */
--- procps-3.3.3.orig/testsuite/ps.test/test-schedbatch.c 2012-03-15 20:17:43.000000000 +0000
+++ procps-3.3.3/testsuite/ps.test/test-schedbatch.c 2012-06-11 11:53:00.778401587 +0100
@@ -15,6 +15,11 @@
#include <sys/time.h>
#include <sys/resource.h>
+/* Defined in Linux headers only */
+#ifndef SCHED_BATCH
+#define SCHED_BATCH 3
+#endif
+
int main(int argc, const char *argv[])
{
int nice = 19;
Reply to: