Description: 适配 gnu-efi 4.0 的 ReallocatePool 新 ABI
 GNU-EFI 构建路径下 refind 按 (OldPool, OldSize, NewSize) 参数顺序调用
 ReallocatePool，而 gnu-efi 4.0 默认 ABI 改为 (OldSize, NewSize, OldPool)，
 导致 GCC 15 下 -Wint-conversion 编译错误。改用 gnu-efi 提供的 3.0 兼容
 接口 ReallocatePool_0（参数顺序与 refind 调用约定一致）。
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Forwarded: not-needed
Last-Update: 2026-09-05

--- refind-0.14.2.orig/EfiLib/legacy.c
+++ refind-0.14.2/EfiLib/legacy.c
@@ -20,7 +20,7 @@
 #include "efilib.h"
 #include "gnuefi-helper.h"
 #define EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH
-#define EfiReallocatePool ReallocatePool
+#define EfiReallocatePool ReallocatePool_0
 #define EfiLibLocateProtocol LibLocateProtocol
 #else
 #include "../include/tiano_includes.h"
--- refind-0.14.2.orig/refind/lib.c
+++ refind-0.14.2/refind/lib.c
@@ -69,7 +69,7 @@
 #include "mystrings.h"
 
 #ifdef __MAKEWITH_GNUEFI
-#define EfiReallocatePool ReallocatePool
+#define EfiReallocatePool ReallocatePool_0
 #else
 #define LibLocateHandle gBS->LocateHandleBuffer
 #define DevicePathProtocol gEfiDevicePathProtocolGuid
