[PATCHv3] boot/image-fit.c: Use aligned_alloc(...) not memalign(...)

Tom Rini trini at konsulko.com
Fri Dec 5 00:10:28 CET 2025


On Tue, 02 Dec 2025 15:20:33 -0600, Tom Rini wrote:

> 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.
> 
> [...]

Applied to u-boot/next, thanks!

[1/1] boot/image-fit.c: Use aligned_alloc(...) not memalign(...)
      commit: abd6e0f252ee17b18e98be69d87aaca6a26e8336
-- 
Tom




More information about the U-Boot mailing list