diff options
author | Manolis Ragkousis <manolis837@gmail.com> | 2016-04-27 23:33:56 +0300 |
---|---|---|
committer | Manolis Ragkousis <manolis837@gmail.com> | 2016-05-04 17:18:57 +0300 |
commit | d46123aade7bc5226004eb46ee1084dc84f2b30a (patch) | |
tree | 890ba4958d75e10ec3a7aa8ff71b2fecc7026063 | |
parent | b5e0c870cb2c4a6864455308c74684fd024f101f (diff) |
gnu: procps: Make procps build on non Linux systems.
* gnu/packages/patches/procps-non-linux.patch.patch: New patch.
* gnu/packages/linux.scm (procps)[source]: Use it.
* gnu/local.mk (dist_patch_DATA): Add it.
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/linux.scm | 4 | ||||
-rw-r--r-- | gnu/packages/patches/procps-non-linux.patch | 40 |
3 files changed, 44 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index da377fdbb3..d223d39bcd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -683,6 +683,7 @@ dist_patch_DATA = \ gnu/packages/patches/poppler-CVE-2015-8868.patch \ gnu/packages/patches/portaudio-audacity-compat.patch \ gnu/packages/patches/procmail-ambiguous-getline-debian.patch \ + gnu/packages/patches/procps-non-linux.patch \ gnu/packages/patches/pt-scotch-build-parallelism.patch \ gnu/packages/patches/pulseaudio-fix-mult-test.patch \ gnu/packages/patches/pulseaudio-longer-test-timeout.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 5f4b041694..7a4f496a3e 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -535,7 +535,9 @@ block devices, UUIDs, TTYs, and many other tools.") "procps-ng-" version ".tar.xz")) (sha256 (base32 - "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9")))) + "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9")) + (patches + (list (search-patch "procps-non-linux.patch"))))) (build-system gnu-build-system) (arguments '(#:modules ((guix build utils) diff --git a/gnu/packages/patches/procps-non-linux.patch b/gnu/packages/patches/procps-non-linux.patch new file mode 100644 index 0000000000..9d369aeb2c --- /dev/null +++ b/gnu/packages/patches/procps-non-linux.patch @@ -0,0 +1,40 @@ +From aa9bd38d0a6fe53aff7f78fb2d9f61e55677c7b5 Mon Sep 17 00:00:00 2001 +From: Craig Small <csmall@enc.com.au> +Date: Sun, 17 Apr 2016 09:09:41 +1000 +Subject: [PATCH] tests: Conditionally add prctl to test process + +prctl was already bypassed on Cygwin systems. This extends to +non-Linux systems such as kFreeBSD and Hurd. + +--- + lib/test_process.c | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/lib/test_process.c b/lib/test_process.c +index 6e652ed..6a4776c 100644 +--- a/lib/test_process.c ++++ b/lib/test_process.c +@@ -21,7 +21,9 @@ + #include <stdlib.h> + #include <unistd.h> + #include <signal.h> ++#ifdef __linux__ + #include <sys/prctl.h> ++#endif + #include "c.h" + + #define DEFAULT_SLEEPTIME 300 +@@ -78,8 +80,10 @@ + sigaction(SIGUSR1, &signal_action, NULL); + sigaction(SIGUSR2, &signal_action, NULL); + ++#ifdef __linux__ + /* set process name */ + prctl(PR_SET_NAME, MY_NAME, NULL, NULL, NULL); ++#endif + + while (sleep_time > 0) { + sleep_time = sleep(sleep_time); +-- +2.8.2 + |