Skip to contentSkip to conversation

mkfs: fix build on 32-bit platforms

PATCH In review Yureka Lilian 2 participants 2 messages Mar 18, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mkfs: fix build on 32-bit platforms

Fixes "proto.c:1136:1: error: conflicting types for 'filesize'; have 'off_t(int)' {aka 'long long int(int)'}"

Fixes 73fb78e5
---
 mkfs/proto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mkfs/proto.c +1 -1
index 6dd3a200..981f5b11 100644
@@ -20,7 +20,7 @@ static struct xfs_trans * getres(struct xfs_mount *mp, uint blocks);
 static void rsvfile(xfs_mount_t *mp, xfs_inode_t *ip, long long len);
 static int newregfile(char **pp, char **fname);
 static void rtinit(xfs_mount_t *mp);
-static long filesize(int fd);
+static off_t filesize(int fd);
 static int slashes_are_spaces;
 
 /*
Signature · 1 line
2.48.1
#1 lore raw
Quoted 25 lines · Yureka Lilian

Fixes "proto.c:1136:1: error: conflicting types for 'filesize'; have 'off_t(int)' {aka 'long long int(int)'}"

Fixes 73fb78e5
---
 mkfs/proto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mkfs/proto.c +1 -1
index 6dd3a200..981f5b11 100644
@@ -20,7 +20,7 @@ static struct xfs_trans * getres(struct xfs_mount *mp, uint blocks);
 static void rsvfile(xfs_mount_t *mp, xfs_inode_t *ip, long long len);
 static int newregfile(char **pp, char **fname);
 static void rtinit(xfs_mount_t *mp);
-static long filesize(int fd);
+static off_t filesize(int fd);
 static int slashes_are_spaces;
 
 /*
Signature · 1 line
2.48.1

Already fixed in for-next branch [1]. Will be in next release

[1]: https://web.git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?h=for-next&id=a5466cee9874412cfdd187f07c5276e1d4ef0fea

Signature · 1 line
- Andrey