导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

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

    编译和烧写问题专区
    2
    3
    1355
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • D
      dysonnnn LV 2 最后由 编辑

      原文地址 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 条回复 最后回复 回复 引用 分享 0
      • whycan
        whycan晕哥 LV 9 @dysonnnn 最后由 编辑

        @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 条回复 最后回复 回复 引用 分享 0
        • D
          dysonnnn LV 2 @whycan 最后由 编辑

          @whycan 谢谢

          1 条回复 最后回复 回复 引用 分享 0
          • 1 / 1
          • First post
            Last post

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

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