HomeFreeBSD

sys/sys: Fix __builtin_is_aligned fallback

Description

sys/sys: Fix __builtin_is_aligned fallback

When the compiler doesn't provide __builtin_is_aligned we use
macro as a fallback. The macro was missing brackets around one
argument. This could lead to incorrect results when the argument is
more complex than a single stagement.

Fix this by adding the needed brackets.

Reviewed by: brooks, imp, jhb
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45260

(cherry picked from commit 940155d24afb5c80ce7fde59c856c5c0d5c6dbe1)

Details

Provenance
andrewAuthored on May 22 2024, 8:18 AM
Reviewer
brooks
Differential Revision
D45260: sys/sys: Fix __builtin_is_aligned fallback
Parents
rGf94f593ca78b: stand/kboot: Fix the linker script OUTPUT_FORMAT
Branches
Unknown
Tags
Unknown