[lttng-dev] Change to CPU number detection breaks QNX compilation

Elad Lahav e2lahav at gmail.com
Sat Aug 13 19:10:30 EDT 2022


Hello,

I have just downloaded and built the library for QNX/aarch64 and
noticed that the code in compat-smp.h breaks the build. This file
appears to be a (very) recent addition, from this commit:

---
commit 5cfe81b7ddff9543d451746de9965cac58c67182
Author: Michael Jeanson <mjeanson at efficios.com>
Date:   Wed Jul 27 10:44:00 2022 -0400

    fix: sysconf(_SC_NPROCESSORS_CONF) can be less than max cpu id

---

I started working around it, but it got a bit ugly. Is the change not
a Linuxism? Does it make sense on other systems? If QNX is the
exception then I can try to come up with a patch, but if not perhaps
the entire code should be wrapped by #ifdef __linux__?

--Elad


More information about the lttng-dev mailing list