summaryrefslogtreecommitdiffstats
path: root/Affinity.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-09-08 13:59:30 +0200
committercgzones <cgzones@googlemail.com>2020-09-18 12:28:40 +0200
commitb85a31415e8d68d0d46a105b1033a92669224682 (patch)
tree61020d61c68f9772967754c2598599e6ad9d84f3 /Affinity.c
parentc3952e7c20a3108c2f16aa579f8062dfc2163bd8 (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.c6
1 files changed, 3 insertions, 3 deletions
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 <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;

© 2014-2024 Faster IT GmbH | imprint | privacy policy