Skip to content

Commit 628ea15

Browse files
pzhristovhristov
andauthored
DPL: protect cpuid.h, it cannot be used on Mac M1 (#5655)
Co-authored-by: hristov <Peter.Hristov@cern.ch>
1 parent 7569c96 commit 628ea15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Framework/Core/src/runDataProcessing.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
#include <sched.h>
110110
#elif __has_include(<linux/getcpu.h>)
111111
#include <linux/getcpu.h>
112-
#elif __has_include(<cpuid.h>)
112+
#elif __has_include(<cpuid.h>) && (__x86_64__ || __i386__)
113113
#include <cpuid.h>
114114
#define CPUID(INFO, LEAF, SUBLEAF) __cpuid_count(LEAF, SUBLEAF, INFO[0], INFO[1], INFO[2], INFO[3])
115115
#define GETCPU(CPU) \
@@ -1462,7 +1462,7 @@ int runStateMachine(DataProcessorSpecs const& workflow,
14621462
parentCPU = sched_getcpu();
14631463
#elif __has_include(<linux/getcpu.h>)
14641464
getcpu(&parentCPU, &parentNode, nullptr);
1465-
#elif __has_include(<cpuid.h>)
1465+
#elif __has_include(<cpuid.h>) && (__x86_64__ || __i386__)
14661466
// FIXME: this is a last resort as it is apparently buggy
14671467
// on some Intel CPUs.
14681468
GETCPU(parentCPU);

0 commit comments

Comments
 (0)