Skip to contentSkip to conversation

erofs-utils: remove AC_FUNC_MALLOC check

PATCH New Yue Hu 2 participants 2 messages May 30, 2019

lore
Share & tools
lore

Yue Hu

author
#0 lore raw

PATCH 1/1 erofs-utils: remove AC_FUNC_MALLOC check

From: Yue Hu <[email protected]>

Below erros happened when building for ARM64, rpl_malloc is not supplied in that case, remove AC_FUNC_MALLOC can fix the errors.

mkfs_file.c: In function 'erofs_compress_file':
mkfs_file.c:600:2: error: implicit declaration of function 'rpl_malloc' [-Werror=implicit-function-declaration]
inode->i_inline_data = malloc(EROFS_BLKSIZE);
^
mkfs_file.c:600:23: error: assignment makes pointer from integer without a cast [-Werror]

  inode->i_inline_data = malloc(EROFS_BLKSIZE);
                       ^
mkfs_file.c: In function 'erofs_init_compress_context':
mkfs_file.c:874:17: error: assignment makes pointer from integer without a cast [-Werror]
  ctx->cc_srcbuf = malloc(erofs_cfg.c_compr_maxsz);
                 ^
mkfs_file.c:875:17: error: assignment makes pointer from integer without a cast [-Werror]
  ctx->cc_dstbuf = malloc(erofs_cfg.c_compr_maxsz * 2);
                 ^

cc1: all warnings being treated as errors
make[2]: *** [mkfs_erofs-mkfs_file.o] Error 1

Signed-off-by Yue Hu <huyue2 at yulong.com>
---
 configure.ac | 1 -
 1 file changed, 1 deletion(-)
configure.ac +0 -1
index 8e3f703..40ee765 100644
@@ -98,7 +98,6 @@ AC_CHECK_MEMBERS([struct stat.st_rdev])
 AC_TYPE_UINT64_T
 
 # Checks for library functions.
-AC_FUNC_MALLOC
 AC_CHECK_FUNCS([ftruncate getcwd gettimeofday memset realpath strdup strerror strrchr strtoull])
 
 # Configure lz4.
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 erofs-utils: remove AC_FUNC_MALLOC check

Hi Yue,

Quoted 19 lines · Yue Hu

From: Yue Hu <huyue2 at yulong.com>

Below erros happened when building for ARM64, rpl_malloc is not supplied in that case, remove AC_FUNC_MALLOC can fix the errors.

mkfs_file.c: In function 'erofs_compress_file':
mkfs_file.c:600:2: error: implicit declaration of function 'rpl_malloc' [-Werror=implicit-function-declaration]
inode->i_inline_data = malloc(EROFS_BLKSIZE);
^
mkfs_file.c:600:23: error: assignment makes pointer from integer without a cast [-Werror]

  inode->i_inline_data = malloc(EROFS_BLKSIZE);
                       ^
mkfs_file.c: In function 'erofs_init_compress_context':
mkfs_file.c:874:17: error: assignment makes pointer from integer without a cast [-Werror]
  ctx->cc_srcbuf = malloc(erofs_cfg.c_compr_maxsz);
                 ^
mkfs_file.c:875:17: error: assignment makes pointer from integer without a cast [-Werror]
  ctx->cc_dstbuf = malloc(erofs_cfg.c_compr_maxsz * 2);
                 ^
Quoted 4 lines

cc1: all warnings being treated as errors
make[2]: *** [mkfs_erofs-mkfs_file.o] Error 1

Signed-off-by Yue Hu <huyue2 at yulong.com>

Thanks for your report and patch, applied to mkfs-dev branch. And as for new erofs-utils, it will be folded into the original patch and I will send the whole series soon.

Thanks,
Gao Xiang

Quoted 17 lines
---
 configure.ac | 1 -
 1 file changed, 1 deletion(-)
configure.ac +0 -1
index 8e3f703..40ee765 100644
@@ -98,7 +98,6 @@ AC_CHECK_MEMBERS([struct stat.st_rdev])
 AC_TYPE_UINT64_T
 
 # Checks for library functions.
-AC_FUNC_MALLOC
 AC_CHECK_FUNCS([ftruncate getcwd gettimeofday memset realpath strdup strerror strrchr strtoull])
 
 # Configure lz4.