Avoid checking of undefined macros

These feature macros are either define or not defined at all at the
configure step.
This commit is contained in:
Christian Göttsche
2020-09-08 13:59:30 +02:00
committed by cgzones
parent c3952e7c20
commit b85a31415e
6 changed files with 20 additions and 20 deletions

View File

@ -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;