diff options
| author | ruki <[email protected]> | 2025-12-21 22:18:53 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-12-21 22:18:53 +0800 |
| commit | a2998b38cb3bf7e60eda78e58cad17a6a1e49faa (patch) | |
| tree | 7608519df3fd7396497bf6f7613973aa0258afe1 | |
| parent | 4a16fe7f90f6d9d5a06e9d34866c075af07d73b5 (diff) | |
fix compile errors
| -rw-r--r-- | core/src/xmake/binutils/elf/rpath.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/binutils/macho/rpath.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/src/xmake/binutils/elf/rpath.c b/core/src/xmake/binutils/elf/rpath.c index 2614c4694..b238ad42f 100644 --- a/core/src/xmake/binutils/elf/rpath.c +++ b/core/src/xmake/binutils/elf/rpath.c @@ -114,7 +114,7 @@ static tb_bool_t xm_binutils_elf_rpath_clean_impl(tb_stream_ref_t istream, tb_hi // allocate buffer for all dynamic entries tb_size_t dyn_size = (tb_size_t)ctx->dynamic_size; - buffer = tb_malloc(dyn_size); + buffer = (tb_byte_t*)tb_malloc(dyn_size); if (!buffer) break; if (!tb_stream_seek(istream, base_offset + ctx->dynamic_offset)) break; diff --git a/core/src/xmake/binutils/macho/rpath.c b/core/src/xmake/binutils/macho/rpath.c index d9cad4524..2d64e3842 100644 --- a/core/src/xmake/binutils/macho/rpath.c +++ b/core/src/xmake/binutils/macho/rpath.c @@ -112,7 +112,7 @@ tb_bool_t xm_binutils_macho_rpath_clean(tb_stream_ref_t istream, tb_hize_t base_ tb_uint32_t new_sizeofcmds = 0; tb_bool_t found = tb_false; - buffer = tb_malloc(64 * 1024); // 64KB should be enough for any load command + buffer = (tb_byte_t*)tb_malloc(64 * 1024); // 64KB should be enough for any load command if (!buffer) break; tb_uint32_t i = 0; |
