summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/xmake/binutils/elf/rpath.c2
-rw-r--r--core/src/xmake/binutils/macho/rpath.c2
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;