Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    使用mainline中最新的buildroot编译生成Lichee RV Dock系统镜像报错

    编译和烧写问题专区
    2
    3
    1342
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dysonnnn LV 2 last edited by

      原文地址 https://whycan.com/t_7711.html
      执行到make的时候报错,
      编译报错:
      64eca546-2286-4991-ad8d-457ae677177d-8807eb80fe9c0fcf4a2829c4c1630ac.jpg

      tools/sunxi_toc1.o: In function toc1_vrec_header': sunxi_toc1.c:(.text+0x1a2): undefined reference to reallocarray'

      使用的是glibc

      whycan 1 Reply Last reply Reply Quote Share 0
      • whycan
        whycan晕哥 LV 9 @dysonnnn last edited by

        @dysonnnn

        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;
        }
        

        https://groups.google.com/g/swupdate/c/tv4jjrLT8dI

        D 1 Reply Last reply Reply Quote Share 0
        • D
          dysonnnn LV 2 @whycan last edited by

          @whycan 谢谢

          1 Reply Last reply Reply Quote Share 0
          • 1 / 1
          • First post
            Last post

          Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

          行为准则 | 用户协议 | 隐私权政策