all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Manolis Ragkousis <manolis837@gmail.com>
To: guix-devel@gnu.org
Subject: [PATCH] gnu: procps: Make procps build on non Linux systems.
Date: Thu, 28 Apr 2016 11:30:09 +0300	[thread overview]
Message-ID: <56b93557-6c80-f1d6-5978-cad718674a14@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 58 bytes --]

With this patch procps can be built on the Hurd.

Manolis

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-procps-Make-procps-build-on-non-Linux-systems.patch --]
[-- Type: text/x-patch; name="0001-gnu-procps-Make-procps-build-on-non-Linux-systems.patch", Size: 2796 bytes --]

From 00c2d2ec11a75e3d74704150488e73ee7c8c6fe8 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Wed, 27 Apr 2016 23:33:56 +0300
Subject: [PATCH] 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.
---
 gnu/local.mk                                |  1 +
 gnu/packages/linux.scm                      |  4 +++-
 gnu/packages/patches/procps-non-linux.patch | 23 +++++++++++++++++++++++
 3 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/procps-non-linux.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 80017ea..036e649 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -673,6 +673,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/polkit-drop-test.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 a26e641..f3c04cd 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -523,7 +523,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 0000000..dd21c82
--- /dev/null
+++ b/gnu/packages/patches/procps-non-linux.patch
@@ -0,0 +1,23 @@
+--- 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);
\ No newline at end of file
-- 
2.8.0


             reply	other threads:[~2016-04-28  8:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28  8:30 Manolis Ragkousis [this message]
2016-04-28  9:55 ` [PATCH] gnu: procps: Make procps build on non Linux systems John Darrington
2016-04-28 12:19 ` Ludovic Courtès
2016-05-03 14:58   ` Manolis Ragkousis
2016-05-03 20:03     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56b93557-6c80-f1d6-5978-cad718674a14@gmail.com \
    --to=manolis837@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.