[lttng-dev] Change to CPU number detection breaks QNX compilation
Michael Jeanson
mjeanson at efficios.com
Mon Aug 15 09:53:44 EDT 2022
On 2022-08-13 19 h 10, Elad Lahav via lttng-dev wrote:
> 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
Hi,
We'll need more details on the build failure you are seeing, there is
already an '#ifdef __linux__' in 'src/compat-smp.h'.
Can you send the relevant build errors?
Michael
More information about the lttng-dev
mailing list