diff options
| author | Tom Rini <[email protected]> | 2025-12-02 15:20:33 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-12-04 14:50:46 -0600 |
| commit | abd6e0f252ee17b18e98be69d87aaca6a26e8336 (patch) | |
| tree | 2c37aaf144add50c69412b7ed307dd8ff30fc4bd /scripts/checkstack.pl | |
| parent | b493db39ea7fb1205d3a2df269352cb79874c1c7 (diff) | |
boot/image-fit.c: Use aligned_alloc(...) not memalign(...)
With the changes in commit 8fbcc0e0e839 ("boot: Assure FDT is always at
8-byte aligned address") to call memalign(...) we now always call
memalign(...) rather than malloc(...) when allocating a buffer that may
contain a device tree. However, memalign(...) is not portable among all
of the host OSes we support. The C11 standard does require that
aligned_alloc(...) exist and it takes the same parameters as
memalign(...) does. Change this file to call aligned_alloc rather than
memalign, and for the non-USE_HOSTCC case define that function back to
memalign.
Fixes: 8fbcc0e0e839 ("boot: Assure FDT is always at 8-byte aligned address")
Suggested-by: Heinrich Schuchardt <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'scripts/checkstack.pl')
0 files changed, 0 insertions, 0 deletions
