From cf5e52fa85ddabe919d30a5763690d2c6c48d1b8 Mon Sep 17 00:00:00 2001 From: Gary Lin Date: Thu, 3 Jul 2025 14:09:41 +0800 Subject: [PATCH] dl: Fix grub_dl_is_persistent() for emu MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When attempting to build grub-emu the compilation failed with the following error message: include/grub/dl.h: In function ‘grub_dl_is_persistent’: include/grub/dl.h:262:1: error: no return statement in function returning non-void [-Werror=return-type] To avoid the error make the function always return 0. Fixes: ba8eadde6be1 (dl: Provide a fake grub_dl_set_persistent() and grub_dl_is_persistent() for the emu target) Signed-off-by: Gary Lin Cc: Daniel Axtens Cc: Sudhakar Kuppusamy Reviewed-by: Sudhakar Kuppusamy Reviewed-by: Daniel Kiper --- include/grub/dl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/grub/dl.h b/include/grub/dl.h index b8135c8f3..53bf9abdb 100644 --- a/include/grub/dl.h +++ b/include/grub/dl.h @@ -259,6 +259,7 @@ grub_dl_set_persistent (grub_dl_t mod __attribute__((unused))) static inline int grub_dl_is_persistent (grub_dl_t mod __attribute__((unused))) { + return 0; } #else static inline void -- 2.47.3