diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-09-08 13:59:30 +0200 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2020-09-18 12:28:40 +0200 |
commit | b85a31415e8d68d0d46a105b1033a92669224682 (patch) | |
tree | 61020d61c68f9772967754c2598599e6ad9d84f3 /Affinity.c | |
parent | c3952e7c20a3108c2f16aa579f8062dfc2163bd8 (diff) |
Avoid checking of undefined macros
These feature macros are either define or not defined at all at the
configure step.
Diffstat (limited to 'Affinity.c')
-rw-r--r-- | Affinity.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -12,12 +12,12 @@ in the source distribution for its full text. #ifdef HAVE_LIBHWLOC #include <hwloc.h> -#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 <sched.h> #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; |