使用mainline中最新的buildroot编译生成Lichee RV Dock系统镜像报错
-
原文地址 https://whycan.com/t_7711.html
执行到make的时候报错,
编译报错:
tools/sunxi_toc1.o: In function
toc1_vrec_header': sunxi_toc1.c:(.text+0x1a2): undefined reference to
reallocarray'使用的是glibc
-
diff --git a/core/bootloader.c b/core/bootloader.c index f34cb41..5694d43 100644 --- a/core/bootloader.c +++ b/core/bootloader.c @@ -25,7 +25,7 @@ static unsigned int num_available = 0; int register_bootloader(const char *name, bootloader *bl) { - entry *tmp = reallocarray(available, num_available + 1, sizeof(entry)); + entry *tmp = realloc(available, (num_available + 1) * sizeof(entry)); if (!tmp) { return -ENOMEM; }
-
@whycan 谢谢
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号