Skip to content

RTAI build cannot use labs()#3442

Merged
andypugh merged 1 commit intoLinuxCNC:masterfrom
BsAtHome:fix_labs-in-rtai
May 19, 2025
Merged

RTAI build cannot use labs()#3442
andypugh merged 1 commit intoLinuxCNC:masterfrom
BsAtHome:fix_labs-in-rtai

Conversation

@BsAtHome
Copy link
Copy Markdown
Contributor

There is no labs() function in the Linux kernel and a usable abs() macro from linux/math.h in newer Linux kernels is apparently not available in the older RTAI kernels. This PR solves the problem by making a local inline absolute function for the purpose. It is no problem that the compiler may not use a built-in function because it is not a critical path.

This fixes #3435.

@andypugh andypugh merged commit 4d43293 into LinuxCNC:master May 19, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

https://github.com/LinuxCNC/linuxcnc/pull/3334 affects RTAI build

2 participants