erofs-utils: fuse: fix warnings on MacOS
PATCH 1/1 erofs-utils: fuse: fix warnings on MacOS
Reported by the latest nightly build:
https://github.com/erofs/erofsnightly/actions/runs/4050082667/jobs/6969376259
Signed-off-by Gao Xiang <[email protected]>
--- fuse/main.c | 9 +++++++-- lib/config.c | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-)
fuse/main.c +7 -2
@@ -143,7 +143,12 @@ static int erofsfuse_readlink(const char *path, char *buffer, size_t size) }static int erofsfuse_getxattr (const char *path,const char *name,char *value, -size_t size) +size_t size +#ifdef __APPLE__ + ,uint32_t position) +#else + ) +#endif {int ret;struct erofs_inode vi;
@@ -227,7 +232,7 @@ static void usage(void)static void erofsfuse_dumpcfg (void ) {erofs_dump ("disk: %s\n" , fusecfg.disk); -erofs_dump ("offset: %lu\n" , fusecfg.offset); +erofs_dump ("offset: %llu\n" , fusecfg.offset |0ULL );erofs_dump ("mountpoint: %s\n" , fusecfg.mountpoint);erofs_dump ("dbglevel: %u\n" , cfg.c_dbg_lvl); }
lib/config.c +2 -1
@@ -100,10 +100,11 @@ static bool __erofs_is_progressmsg;char *erofs_trim_for_progressinfo (const char *str,int placeholder) { -struct winsize winsize;int col, len;#ifdef GWINSZ_IN_SYS_IOCTL +struct winsize winsize; +if (ioctl (1 ,TIOCGWINSZ , &winsize) >=0 && winsize.ws_col >0 ) col = winsize.ws_col;
Signature · 1 line
2.24.4