On Thursday 23 January 2020 17:01:00 Chris Lamb wrote: > [please retain all CCs upon replying, I am not subscribed to this list] > > Hi, > > I'm the maintainer of the "mtools" package in Debian. The following > bug report was just filed there which I will quote in full, but it can > also be viewed here: > > https://bugs.debian.org/949665 > > > Running e.g. mdir -i $SOMEFILE@@$LARGEOFFSET fails when the offset > > exceeds around 2GB. The error message is: > > > > | seek: Invalid argument > > | init :: could not read boot sector > > | Cannot initialize '::' > > > > Using strace one can see that mtools tries to seek the image to a > > negative offset that results from treating the desired offset as a > > signed 32bit number. > […] > > Most likely, it can be fixed by adding -D_FILE_OFFSET_BITS=64 to the > > CFLAGS. > > I then briefly asked whether this would be suitable for inclusion > upstream, to which the reporter was in agreement. Please see https:// > bugs.debian.org/949665#15 for more on this, including the sketchings > of a patch.
Hello! For handling problems with large files, autoconf has m4 macro: AC_SYS_LARGEFILE It automatically checks if some special compiler flags are needed for handling large files and if yes, this macro automatically modifies compiler flags. So I think adding AC_SYS_LARGEFILE into configure.ac should fix this problem for all platforms (supported by autoconf). -- Pali Rohár pali.ro...@gmail.com
signature.asc
Description: PGP signature