From 0c78f4f954880e05d09c5cd003f43bff1a3e94f5 Mon Sep 17 00:00:00 2001 From: Craig Small 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. References: https://bugs.debian.org/816237 --- NEWS | 1 + lib/test_process.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index e92355e7..c044e61c 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ procps-ng-NEXT * ps: sort by cgroup Debian #692279 * ps: display control group name with -o cgname * ps: Fallback to attr/current for context Debian #786956 + * tests: Conditionally add prctl Debian #816237 procps-ng-3.3.11 ---------------- diff --git a/lib/test_process.c b/lib/test_process.c index 6e652ed5..6a4776c5 100644 --- a/lib/test_process.c +++ b/lib/test_process.c @@ -21,7 +21,7 @@ #include #include #include -#ifndef __CYGWIN__ +#ifdef __linux__ #include #endif #include "c.h" @@ -80,7 +80,7 @@ int main(int argc, char *argv[]) sigaction(SIGUSR1, &signal_action, NULL); sigaction(SIGUSR2, &signal_action, NULL); -#ifndef __CYGWIN__ +#ifdef __linux__ /* set process name */ prctl(PR_SET_NAME, MY_NAME, NULL, NULL, NULL); #endif