This is trivial to do and simplifies Rust support enormously. Signed-off-by: Daniel Axtens <d...@axtens.net> --- grub-core/kern/emu/mm.c | 6 ++++++ include/grub/mm.h | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/grub-core/kern/emu/mm.c b/grub-core/kern/emu/mm.c index 4d1046a219eb..71dc8d422f3e 100644 --- a/grub-core/kern/emu/mm.c +++ b/grub-core/kern/emu/mm.c @@ -73,3 +73,9 @@ grub_realloc (void *ptr, grub_size_t size) grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory")); return ret; } + +void * +grub_memalign (grub_size_t align, grub_size_t size) +{ + return aligned_alloc (align, size); +} diff --git a/include/grub/mm.h b/include/grub/mm.h index 9c38dd3ca5d2..4407179a838d 100644 --- a/include/grub/mm.h +++ b/include/grub/mm.h @@ -34,9 +34,7 @@ void *EXPORT_FUNC(grub_malloc) (grub_size_t size); void *EXPORT_FUNC(grub_zalloc) (grub_size_t size); void EXPORT_FUNC(grub_free) (void *ptr); void *EXPORT_FUNC(grub_realloc) (void *ptr, grub_size_t size); -#ifndef GRUB_MACHINE_EMU void *EXPORT_FUNC(grub_memalign) (grub_size_t align, grub_size_t size); -#endif void grub_mm_check_real (const char *file, int line); #define grub_mm_check() grub_mm_check_real (GRUB_FILE, __LINE__); -- 2.30.2 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel