Skip to content
Snippets Groups Projects
Commit c36cc99d authored by Domokos Sármány's avatar Domokos Sármány Committed by Ali Mohammed
Browse files

Always use 'defined' in compound logical statements for macros

parent d4310fdd
Branches
Tags
1 merge request!54Resolve "Compilation error when building maestro-core on M1 Apple processors"
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#include <numaif.h> #include <numaif.h>
#endif #endif
#ifdef __APPLE__ && (!defined(__arm64__)) #ifdef defined(__APPLE__) && (!defined(__arm64__))
#include <cpuid.h> #include <cpuid.h>
#endif #endif
...@@ -106,7 +106,7 @@ int ...@@ -106,7 +106,7 @@ int
mstro_numa_get_cpu(void) { mstro_numa_get_cpu(void) {
#if defined(__linux) || defined(__linux__) #if defined(__linux) || defined(__linux__)
return sched_getcpu(); return sched_getcpu();
#elif __APPLE__ && (!defined(__arm64__)) #elif defined(__APPLE__) && (!defined(__arm64__))
#define CPUID(INFO, LEAF, SUBLEAF) __cpuid_count(LEAF, SUBLEAF, INFO[0], INFO[1], INFO[2], INFO[3]) #define CPUID(INFO, LEAF, SUBLEAF) __cpuid_count(LEAF, SUBLEAF, INFO[0], INFO[1], INFO[2], INFO[3])
uint32_t CPUInfo[4]; uint32_t CPUInfo[4];
CPUID(CPUInfo, 1, 0); CPUID(CPUInfo, 1, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment