Files
MSYS2-packages/util-linux/2.39.3-cygwin-fallocate.patch
2025-02-06 12:47:39 -08:00

41 lines
1.6 KiB
Diff

--- origsrc/util-linux-2.33.1/configure.ac 2024-01-23 22:58:06.478114400 -0800
+++ src/util-linux-2.33.1/configure.ac 2024-01-23 23:51:03.975479300 -0800
@@ -1290,7 +1290,6 @@ AC_ARG_ENABLE([fallocate],
[], [UL_DEFAULT_ENABLE([fallocate], [check])]
)
UL_BUILD_INIT([fallocate])
-UL_REQUIRES_LINUX([fallocate])
UL_REQUIRES_SYSCALL_CHECK([fallocate], [UL_CHECK_SYSCALL([fallocate])])
AM_CONDITIONAL([BUILD_FALLOCATE], [test "x$build_fallocate" = xyes])
--- origsrc/util-linux-2.39.3/sys-utils/fallocate.c 2023-12-01 03:25:16.021047300 -0800
+++ src/util-linux-2.39.3/sys-utils/fallocate.c 2024-03-07 22:10:21.660207700 -0800
@@ -417,21 +417,22 @@ int main(int argc, char **argv)
if (verbose) {
char *str = size_to_human_string(SIZE_SUFFIX_3LETTER | SIZE_SUFFIX_SPACE, length);
+ uintmax_t ulength = (uintmax_t) length;
if (mode & FALLOC_FL_PUNCH_HOLE)
fprintf(stdout, _("%s: %s (%ju bytes) hole created.\n"),
- filename, str, length);
+ filename, str, ulength);
else if (mode & FALLOC_FL_COLLAPSE_RANGE)
fprintf(stdout, _("%s: %s (%ju bytes) removed.\n"),
- filename, str, length);
+ filename, str, ulength);
else if (mode & FALLOC_FL_INSERT_RANGE)
fprintf(stdout, _("%s: %s (%ju bytes) inserted.\n"),
- filename, str, length);
+ filename, str, ulength);
else if (mode & FALLOC_FL_ZERO_RANGE)
fprintf(stdout, _("%s: %s (%ju bytes) zeroed.\n"),
- filename, str, length);
+ filename, str, ulength);
else
fprintf(stdout, _("%s: %s (%ju bytes) allocated.\n"),
- filename, str, length);
+ filename, str, ulength);
free(str);
}
}