From b85a31415e8d68d0d46a105b1033a92669224682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 8 Sep 2020 13:59:30 +0200 Subject: Avoid checking of undefined macros These feature macros are either define or not defined at all at the configure step. --- Affinity.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Affinity.c') diff --git a/Affinity.c b/Affinity.c index 3ea45a9b..098e5c16 100644 --- a/Affinity.c +++ b/Affinity.c @@ -12,12 +12,12 @@ in the source distribution for its full text. #ifdef HAVE_LIBHWLOC #include -#if __linux__ +#ifdef __linux__ #define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_THREAD #else #define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_PROCESS #endif -#elif HAVE_LINUX_AFFINITY +#elif defined(HAVE_LINUX_AFFINITY) #include #endif @@ -79,7 +79,7 @@ bool Affinity_set(Process* proc, Arg arg) { return ok; } -#elif HAVE_LINUX_AFFINITY +#elif defined(HAVE_LINUX_AFFINITY) Affinity* Affinity_get(Process* proc, ProcessList* pl) { cpu_set_t cpuset; -- cgit v1.2.3