From d1f42082590bed42cbf6ef1bf37e936df1afbf6b Mon Sep 17 00:00:00 2001 From: Tobias Tangemann Date: Thu, 9 Jul 2015 23:51:07 +0200 Subject: [PATCH] Fix crash (and compiler warnings) [Upstream: https://github.com/opsengine/cpulimit/pull/48] Signed-off-by: Florian Fainelli --- src/cpulimit.c | 2 +- src/process_group.c | 4 ++++ tests/process_iterator_test.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cpulimit.c b/src/cpulimit.c index 50eabeacf214..42d7ca280738 100644 --- a/src/cpulimit.c +++ b/src/cpulimit.c @@ -43,7 +43,7 @@ #include #include -#ifdef __APPLE__ || __FREEBSD__ +#if defined(__APPLE__) || defined(__FREEBSD__) #include #endif diff --git a/src/process_group.c b/src/process_group.c index 06d73a6f3541..c9e148cd1b60 100644 --- a/src/process_group.c +++ b/src/process_group.c @@ -25,6 +25,10 @@ #include #include +#if defined(__APPLE__) || defined(__FREEBSD__) +#include +#endif + #include #include "process_iterator.h" diff --git a/tests/process_iterator_test.c b/tests/process_iterator_test.c index 16151967eb24..1bfc167ba895 100644 --- a/tests/process_iterator_test.c +++ b/tests/process_iterator_test.c @@ -28,7 +28,7 @@ #include #include -#ifdef __APPLE__ || __FREEBSD__ +#if defined(__APPLE__) || defined(__FREEBSD__) #include #endif -- 2.25.1